Skip to content

Middleware does not match when using basePath and default locale #2472

Open
@serhalp

Description

@serhalp

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions