Skip to content

Commit

Permalink
nit re-use protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Nov 12, 2024
1 parent 1a57e1b commit a9386a2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/next/src/server/lib/start-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,14 @@ export async function startServer(

const networkHostname =
hostname ?? getNetworkHost(isIPv6(actualHostname) ? 'IPv6' : 'IPv4')

const protocol = selfSignedCertificate ? 'https' : 'http'

const networkUrl = networkHostname
? `${selfSignedCertificate ? 'https' : 'http'}://${formatHostname(networkHostname)}:${port}`
? `${protocol}://${formatHostname(networkHostname)}:${port}`
: null

const appUrl = `${
selfSignedCertificate ? 'https' : 'http'
}://${formattedHostname}:${port}`
const appUrl = `${protocol}://${formattedHostname}:${port}`

if (nodeDebugType) {
const formattedDebugAddress = getFormattedDebugAddress()
Expand Down

0 comments on commit a9386a2

Please sign in to comment.