diff --git a/test/webserver.mjs b/test/webserver.mjs index 52511ed637ce2..c8865916304ad 100644 --- a/test/webserver.mjs +++ b/test/webserver.mjs @@ -46,7 +46,7 @@ class WebServer { constructor({ root, host, port, cacheExpirationTime }) { const cwdURL = pathToFileURL(process.cwd()) + "/"; this.rootURL = new URL(`${root || "."}/`, cwdURL); - this.host = host || "localhost"; + this.host = host || (process.env.ANY_HOST ? "0.0.0.0" : "localhost"); this.port = port || 0; this.server = null; this.verbose = false;