Compare commits

...

2 Commits

Author SHA1 Message Date
6074747b34 fix(middleware): bypass internationalization for stats and errors
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🧪 QA (push) Successful in 2m6s
Build & Deploy / 🏗️ Build (push) Failing after 23m58s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
2026-02-12 18:18:51 +01:00
319b2b3e0c fix(analytics): restore missing UMAMI_API_ENDPOINT in environment schema
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m35s
Build & Deploy / 🏗️ Build (push) Successful in 36s
Build & Deploy / 🚀 Deploy (push) Successful in 28s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-02-12 17:59:03 +01:00
2 changed files with 11 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ const envExtension = {
// Analytics
UMAMI_WEBSITE_ID: z.string().optional(),
UMAMI_API_ENDPOINT: z.string().optional(),
};
/**

View File

@@ -12,6 +12,16 @@ const intlMiddleware = createMiddleware({
export default function middleware(request: NextRequest) {
const { method, url, headers } = request;
const { pathname } = request.nextUrl;
// Explicit bypass for infrastructure routes to avoid locale redirects/interception
if (
pathname.startsWith('/stats') ||
pathname.startsWith('/errors') ||
pathname.startsWith('/health')
) {
return;
}
// Build header object for logging
const headerObj: Record<string, string> = {};