File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 1
1
import type { NextFetchEvent , NextRequest } from 'next/server' ;
2
2
import { clerkMiddleware , createRouteMatcher } from '@clerk/nextjs/server' ;
3
3
import createMiddleware from 'next-intl/middleware' ;
4
- import { NextResponse } from 'next/server' ;
5
4
import { routing } from './libs/i18nNavigation' ;
6
5
7
6
const intlMiddleware = createMiddleware ( routing ) ;
@@ -43,16 +42,6 @@ export default function middleware(
43
42
} ) ( request , event ) ;
44
43
}
45
44
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
-
56
45
return intlMiddleware ( request ) ;
57
46
}
58
47
You can’t perform that action at this time.
0 commit comments