Unverified Commit 42ad2cef authored by Tommaso De Rossi's avatar Tommaso De Rossi Committed by GitHub

Set standalone server default hostname to `0.0.0.0` (#54445)

By default Next.js listens on localhost, platforms like Google Cloud Run and fly.io will fail to deploy apps that listen on `localhost`, Next.js should bind to `0.0.0.0` instead

Related to #54342
Fixes #49777
Fixes #54133
parent 724ece85
......@@ -1984,7 +1984,7 @@ if (!process.env.NEXT_MANUAL_SIG_HANDLE) {
}
const currentPort = parseInt(process.env.PORT, 10) || 3000
const hostname = process.env.HOSTNAME || 'localhost'
const hostname = process.env.HOSTNAME || '0.0.0.0'
let keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10)
const nextConfig = ${JSON.stringify({
......
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