Skip to content

Commit 841b638

Browse files
committed
fix: remove middleware changes
1 parent 4d1d46e commit 841b638

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/middleware.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { NextFetchEvent, NextRequest } from 'next/server';
22
import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
33
import createMiddleware from 'next-intl/middleware';
4-
import { NextResponse } from 'next/server';
54
import { routing } from './libs/i18nNavigation';
65

76
const intlMiddleware = createMiddleware(routing);
@@ -43,16 +42,6 @@ export default function middleware(
4342
})(request, event);
4443
}
4544

46-
// Extract the URL pathname from the request
47-
const path = request.nextUrl.pathname;
48-
49-
// Allow direct access to sitemap.xml and robots.txt without i18n middleware processing
50-
// This ensures these files are properly served for SEO purposes
51-
// Related to GitHub issue: https://github.com/ixartz/Next-js-Boilerplate/issues/356
52-
if (path === '/sitemap.xml' || path === '/robots.txt') {
53-
return NextResponse.next();
54-
}
55-
5645
return intlMiddleware(request);
5746
}
5847

0 commit comments

Comments
 (0)