proxy urls
Some checks failed
Build & Deploy KLZ Cables / deploy (push) Failing after 2m21s

This commit is contained in:
2026-01-25 13:25:37 +01:00
parent cf5df1b46b
commit 1380d40b4d
7 changed files with 51 additions and 70 deletions

View File

@@ -343,14 +343,17 @@ const nextConfig = {
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
async rewrites() {
const umamiUrl = process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL?.replace('/script.js', '') || 'https://analytics.infra.mintel.me';
const glitchtipUrl = process.env.SENTRY_DSN ? new URL(process.env.SENTRY_DSN).origin : 'https://errors.infra.mintel.me';
return [
{
source: '/stats/:path*',
destination: 'https://analytics.infra.mintel.me/:path*',
destination: `${umamiUrl}/:path*`,
},
{
source: '/errors/:path*',
destination: 'https://errors.infra.mintel.me/:path*',
destination: `${glitchtipUrl}/:path*`,
},
];
},