Skip to content

Commit 030f2f8

Browse files
authored
cloud: drop hardcoded VITE_PUBLIC_SENTRY_DSN from wrangler.jsonc (#382)
The frontend Sentry DSN was committed in wrangler.jsonc `vars`. Move it to a Wrangler secret (same pattern as SENTRY_DSN, DATABASE_URL, WORKOS_*) so it's not in source and persists across every deploy path (secrets are never deleted by deployments, regardless of --keep-vars). The client bundle continues to get the value at build time via Vite reading process.env.VITE_PUBLIC_SENTRY_DSN under `op run --env-file=.env.production`. One-time setup after deploying this change: op run --env-file=.env.production -- sh -c 'printf "%s" "$VITE_PUBLIC_SENTRY_DSN" | bunx wrangler secret put VITE_PUBLIC_SENTRY_DSN'
1 parent 8fa1357 commit 030f2f8

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/cloud/src/env-augment.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare global {
1111
AXIOM_TRACES_URL?: string;
1212
AXIOM_TRACES_SAMPLE_RATIO?: string;
1313
SENTRY_DSN?: string;
14+
VITE_PUBLIC_SENTRY_DSN?: string;
1415

1516
// Datastore (dev only — prod uses HYPERDRIVE binding)
1617
DATABASE_URL?: string;

‎apps/cloud/wrangler.jsonc‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
},
5050
],
5151
"vars": {
52-
"VITE_PUBLIC_SENTRY_DSN": "https://e20b1bdeea27008092a4dc0ac303e97a@o4511196985556992.ingest.us.sentry.io/4511197010067456",
5352
"VITE_PUBLIC_SITE_URL": "https://executor.sh",
5453
},
5554
}

0 commit comments

Comments
 (0)