Skip to content

Commit

Permalink
update further down
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 5, 2023
1 parent 8a91b98 commit 7aa6879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ if (!process.env.NEXT_MANUAL_SIG_HANDLE) {
}
const currentPort = parseInt(process.env.PORT, 10) || 3000
const hostname = process.env.HOSTNAME || '127.0.0.1'
const hostname = process.env.HOSTNAME || 'localhost'
const keepAliveTimeout = parseInt(process.env.KEEP_ALIVE_TIMEOUT, 10);
const nextConfig = ${JSON.stringify({
...serverConfig,
Expand Down
4 changes: 3 additions & 1 deletion packages/next/src/server/lib/render-server-standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export const createServerHandler = async ({
didInitialize = true

const getProxyServer = (pathname: string) => {
const targetUrl = `http://${hostname}:${routerPort}${pathname}`
const targetUrl = `http://${
hostname === 'localhost' ? '127.0.0.1' : hostname
}:${routerPort}${pathname}`
const proxyServer = httpProxy.createProxy({
target: targetUrl,
changeOrigin: false,
Expand Down

0 comments on commit 7aa6879

Please sign in to comment.