Use different projects/DSNs for remix and functions
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user