Add Sentry tunnel to bypass ad-blocker on test environment
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -20,6 +20,13 @@ if (sentryDsn) {
|
||||
tracesSampleRate: 1.0,
|
||||
// Required for Sentry.logger.* calls (e.g. the temporary SentryTestButton) to actually be sent.
|
||||
enableLogs: true,
|
||||
// Ad-blockers/privacy extensions commonly block requests straight to *.ingest.sentry.io
|
||||
// (ERR_BLOCKED_BY_CLIENT), because it looks like third-party tracking. Routing through our
|
||||
// own domain via a reverse-proxy "tunnel" avoids that (see nginx/reverse-proxy-nginx.conf.example).
|
||||
// Only enabled for built (test/production) environments — local dev (`pnpm dev`) has no such
|
||||
// proxy route available, so it keeps posting straight to Sentry (resolved by disabling the
|
||||
// ad-blocker locally instead).
|
||||
tunnel: import.meta.env.DEV ? undefined : '/sentry-tunnel',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user