You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The middleware request will receive a strange url as http://localhost:3000/zh-CN/sites/zh-CN
also middleware request.nextUrl.basePath is different from the nextjs.config.js
Expected Behavior
When user navigate to page /sites/zh-CN
The middleware request should receive url as http://localhost:3000/sites/zh-CN
also middleware request.nextUrl.basePath should be same as nextjs.config.js
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
Binaries:
Node: 18.12.0
npm: 8.19.2
Yarn: 1.23.0-20220130.1630
pnpm: 7.18.2
Relevant packages:
next: 13.1.1-canary.1
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://github.com/promer94/nextjs-middleware-basePath
To Reproduce
navigate to
/sites/zh-CN
Describe the Bug
When user navigate to page
/sites/zh-CN
The middleware
request
will receive a strangeurl
ashttp://localhost:3000/zh-CN/sites/zh-CN
also middleware
request.nextUrl.basePath
is different from thenextjs.config.js
Expected Behavior
When user navigate to page
/sites/zh-CN
The middleware
request
should receiveurl
ashttp://localhost:3000/sites/zh-CN
also middleware
request.nextUrl.basePath
should be same asnextjs.config.js
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: