Open
Description
A pages router site with both basepath and i18n enabled does not match middleware targeted at the root unless a locale is in the URL. It should match when using the default locale
Demo:
- https://6634b69452829cd391cab206--next-e2e-tests.netlify.app/root/ does not have
x-from-middleware
header - https://6634b69452829cd391cab206--next-e2e-tests.netlify.app/root/en/ does have
x-from-middleware
header
Data
The following is parsed automatically by the Next.js repo e2e test report generator.
test: test/e2e/middleware-matcher/index.test.ts
reason: Middleware does not match when using basePath and default locale