Skip to content

Commit c6370f0

Browse files
authored
docs: Update middleware.mdx
1 parent e2be6aa commit c6370f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/src/pages/docs/routing/middleware.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const handleI18nRouting = createMiddleware(routing);
134134
export default function middleware(request: NextRequest) {
135135
const {pathname} = request.nextUrl;
136136

137+
// Matches '/', as well as all paths that start with a locale like '/en'
137138
const shouldHandle =
138139
pathname === '/' ||
139140
new RegExp(`^/(${locales.join('|')})(/.*)?$`).test(

0 commit comments

Comments
 (0)