Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6074747b34 | |||
| 319b2b3e0c |
@@ -25,6 +25,7 @@ const envExtension = {
|
||||
|
||||
// Analytics
|
||||
UMAMI_WEBSITE_ID: z.string().optional(),
|
||||
UMAMI_API_ENDPOINT: z.string().optional(),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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> = {};
|
||||
|
||||
Reference in New Issue
Block a user