request header host is [::]:3000 in middleware when redirecting in server action #62902
Labels
bug
Issue was opened via the bug report template.
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/kevinmitch14/redirects
To Reproduce
Current vs. Expected behavior
Current: host is [::]:3000
Expected: host is localhost:3000
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 20.9.0 npm: 10.1.0 Yarn: 1.22.19 pnpm: 8.15.1 Relevant Packages: next: 14.2.0-canary.0 // Latest available version is detected (14.2.0-canary.0). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
App Router, Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
Host looks to be okay when deployed to Vercel. However I wasn't able to test this with subdomains.
I've tracked it down to this PR #62561. Using the canary version before this logs host as localhost:3000.
For context, our app is a multi tenant app, each tenant lives on a subdomain. We use rewrites to handle this. To get the subdomain, we use the request host header.
The text was updated successfully, but these errors were encountered: