Skip to content

Commit

Permalink
Fix e2e deploy test for Node.js v18 (#43109)
Browse files Browse the repository at this point in the history
This updates the Node.js version check for proxying when running against
a deployment.

Fixes:
https://github.com/vercel/next.js/actions/runs/3501049844/jobs/5864420602
  • Loading branch information
ijjk committed Nov 19, 2022
1 parent a35612a commit ecfd2f4
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -12,7 +12,7 @@ export default function handler(req, res) {
request(
`http://${
// node v18 resolves to IPv6 by default so force IPv4
process.version.startsWith('v18.')
process.version.startsWith('v18.') && !process.env.VERCEL_URL
? `127.0.0.1:${req.headers.host.split(':').pop() || ''}`
: req.headers.host
}${req.url}/post`,
Expand Down

0 comments on commit ecfd2f4

Please sign in to comment.