Voeg Sentry-tunnel ook toe voor lokale development

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-07-25 15:46:58 +02:00
co-authored by Junie
parent f650c01c3e
commit 588e198028
4 changed files with 31 additions and 6 deletions
+14
View File
@@ -10,6 +10,20 @@ export default defineConfig({
// Injected at build time, used as the Sentry `release` tag (see src/main.tsx).
__APP_VERSION__: JSON.stringify(version),
},
server: {
proxy: {
// Mirrors the reverse-proxy Pi's "/sentry-tunnel" location (see
// nginx/reverse-proxy-nginx.conf.example) so the same tunnel path also
// works locally during `pnpm dev`, avoiding ad-blocker ERR_BLOCKED_BY_CLIENT
// errors when testing locally too (see src/main.tsx's Sentry.init tunnel option).
// LET OP: moet in sync blijven met de VITE_SENTRY_DSN uit .env.local.
'/sentry-tunnel': {
target: 'https://o4511795618185216.ingest.de.sentry.io',
changeOrigin: true,
rewrite: () => '/api/4511795622838352/envelope/',
},
},
},
test: {
environment: 'jsdom',
globals: true,