Unverified Commit ecfd2f4c authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix e2e deploy test for Node.js v18 (#43109)

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
parent a35612ae
......@@ -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`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment