Use different projects/DSNs for remix and functions

This commit is contained in:
2026-03-12 03:33:37 -04:00
parent d613cc1801
commit 7d29433c36
3 changed files with 3 additions and 3 deletions

View File

@@ -131,7 +131,7 @@ export async function loader({
let data: { [k: string]: string } = {}; let data: { [k: string]: string } = {};
if (context.data.current_user) data = { ...context.data.current_user }; 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.nonce) data.nonce = context.data.nonce;
if (context.data.theme) data.theme = context.data.theme; if (context.data.theme) data.theme = context.data.theme;

View File

@@ -382,7 +382,7 @@ async function setTheme(context: RequestContext) {
export const onRequest = [ export const onRequest = [
Sentry.sentryPagesPlugin((context: RequestContext) => ({ Sentry.sentryPagesPlugin((context: RequestContext) => ({
dsn: context.env.DSN, dsn: context.env.FUNCTIONS_DSN,
sendDefaultPii: true, sendDefaultPii: true,
})), })),
setAuth, setAuth,

View File

@@ -8,7 +8,7 @@ export async function onRequestPost(context: RequestContext) {
const { dsn } = JSON.parse(header); 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); const sentryUrl = new URL(dsn);