History

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'

Rhys Sullivan committed 6 months ago

Commit 030f2f81 parent 8fa13572 files · +1 −1Browse files

Showing the changes to apps/cloud/src (1 of 2 files). Show all

Unified · Split

apps/cloud/src/env-augment.d.ts+1−0
@@ -11,6 +11,7 @@ declare global { · 10 unmodified lines
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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t