Link to the code that reproduces this issue
https://github.com/PacoSoftwerft/multi-zone-microfrontends
To Reproduce
Start main-site
Start blog
Start the blog in a new shell
Bug
Open http://localhost:3000/blog, it is loading in a loop.
Current vs. Expected behavior
Expected behavior:
rewrite to same domain "localhost" with different port should work like they did in 13.4.12
Version next@13.4.12 is working just fine.
Stop the main-site then
cd main-site
npm i next@13.4.12 --save-exact
npm run dev
open http://localhost:3000/blog
Verify canary release
Provide environment information
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Node: v18.18.0
npm: 10.1.0
Which area(s) are affected? (Select all that apply)
Routing (next/router, next/navigation, next/link)
Additional context
This bug was introduced with 13.4.13
The bug only appears when using the Pages Router
The bug depends on the version of the app that rewrites, here main-site.
It seems like the port is stripped/not respected somewhere.
The rewrite works if it points to another domain.
Additional info 2023-10-20
The bug only appears when both zones are started with npm run dev
| main (3000) |
blog (3001) |
works? |
npm run dev |
npm run dev |
❌ |
npm run dev |
npm run build npm run start |
✅ |
npm run build npm run start |
npm run dev |
✅ |
npm run build npm run start |
npm run build npm run start |
✅ |
Link to the code that reproduces this issue
https://github.com/PacoSoftwerft/multi-zone-microfrontends
To Reproduce
Start main-site
cd main-site npm run devStart blog
Start the blog in a new shell
cd blog npm run devBug
Open
http://localhost:3000/blog, it is loading in a loop.Current vs. Expected behavior
Expected behavior:
rewrite to same domain "localhost" with different port should work like they did in 13.4.12
Version
next@13.4.12is working just fine.Stop the
main-sitethencd main-site npm i next@13.4.12 --save-exact npm run devopen
http://localhost:3000/blogVerify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Routing (next/router, next/navigation, next/link)
Additional context
This bug was introduced with 13.4.13
The bug only appears when using the Pages Router
The bug depends on the version of the app that rewrites, here main-site.
It seems like the port is stripped/not respected somewhere.
The rewrite works if it points to another domain.
Additional info 2023-10-20
The bug only appears when both zones are started with
npm run devnpm run devnpm run devnpm run devnpm run buildnpm run startnpm run buildnpm run startnpm run devnpm run buildnpm run startnpm run buildnpm run start