diff --git a/app/root.tsx b/app/root.tsx index a0436da..df9a112 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -131,7 +131,7 @@ export async function loader({ let data: { [k: string]: string } = {}; if (context.data.current_user) data = { ...context.data.current_user }; - if (context.env.DSN) data.dsn = context.env.DSN; + if (context.env.REMIX_DSN) data.dsn = context.env.REMIX_DSN; if (context.data.nonce) data.nonce = context.data.nonce; if (context.data.theme) data.theme = context.data.theme; diff --git a/functions/_middleware.ts b/functions/_middleware.ts index 26c3601..c2ca4a6 100644 --- a/functions/_middleware.ts +++ b/functions/_middleware.ts @@ -382,7 +382,7 @@ async function setTheme(context: RequestContext) { export const onRequest = [ Sentry.sentryPagesPlugin((context: RequestContext) => ({ - dsn: context.env.DSN, + dsn: context.env.FUNCTIONS_DSN, sendDefaultPii: true, })), setAuth, diff --git a/functions/api/st.ts b/functions/api/st.ts index 584e808..a7f978a 100644 --- a/functions/api/st.ts +++ b/functions/api/st.ts @@ -8,7 +8,7 @@ export async function onRequestPost(context: RequestContext) { const { dsn } = JSON.parse(header); - if (context.env.DSN !== dsn) return jsonError("Bad or no DSN", 400); + if (context.env.REMIX_DSN !== dsn) return jsonError("Bad or no DSN", 400); const sentryUrl = new URL(dsn);