Add Sentry tunnel to bypass ad-blocker on test environment

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-07-25 15:40:14 +02:00
co-authored by Junie
parent b7617d968d
commit f650c01c3e
4 changed files with 38 additions and 0 deletions
+7
View File
@@ -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',
});
}