From b2d147e6325e7e333f4c70291a0b3f75ed46b91b Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Fri, 11 Oct 2024 16:04:33 +0100 Subject: [PATCH] address feedback --- packages/astro/src/core/app/node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/app/node.ts b/packages/astro/src/core/app/node.ts index 18999e141cf8..c172ed5b5bb3 100644 --- a/packages/astro/src/core/app/node.ts +++ b/packages/astro/src/core/app/node.ts @@ -88,7 +88,7 @@ export class NodeApp extends App { forwardedPort ?? (isEncrypted ? '443' : '80'); const portInHostname = typeof hostname === 'string' && /:\d+$/.test(hostname); - const hostnamePort = portInHostname ? hostname : `${hostname}${port ? `:${port}` : ''}`; + const hostnamePort = portInHostname ? hostname : `${hostname}:${port}`; const url = `${protocol}://${hostnamePort}${req.url}`; const options: RequestInit = {