Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware receive extra locale prefix in request.url #44334

Open
1 task done
promer94 opened this issue Dec 24, 2022 · 1 comment
Open
1 task done

Middleware receive extra locale prefix in request.url #44334

promer94 opened this issue Dec 24, 2022 · 1 comment
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity.

Comments

@promer94
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in the latest Next.js 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

pnpm dev

navigate to /sites/zh-CN

Describe the Bug

When user navigate to page /sites/zh-CN

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

@promer94 promer94 added the bug Issue was opened via the bug report template. label Dec 24, 2022
@vercel-release-bot
Copy link
Collaborator

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.

@vercel-release-bot vercel-release-bot added the stale The issue has not seen recent activity. label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity.
Projects
None yet
Development

No branches or pull requests

2 participants