diff options
Diffstat (limited to 'ext/http')
-rw-r--r-- | ext/http/00_serve.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts index 670b64676..a58d19d76 100644 --- a/ext/http/00_serve.ts +++ b/ext/http/00_serve.ts @@ -657,7 +657,8 @@ function serve(arg1, arg2) { // If the hostname is "0.0.0.0", we display "localhost" in console // because browsers in Windows don't resolve "0.0.0.0". // See the discussion in https://github.com/denoland/deno_std/issues/1165 - const hostname = addr.hostname == "0.0.0.0" || addr.hostname == "::" + const hostname = (addr.hostname == "0.0.0.0" || addr.hostname == "::") && + (Deno.build.os === "windows") ? "localhost" : addr.hostname; addr.hostname = hostname; |