diff --git a/src/http/partials/Server/HTTP.ServerTo.cs b/src/http/partials/Server/HTTP.ServerTo.cs index 5b7ee24..dea5e06 100644 --- a/src/http/partials/Server/HTTP.ServerTo.cs +++ b/src/http/partials/Server/HTTP.ServerTo.cs @@ -37,7 +37,20 @@ public Task Open(Uri host) { var server = new HttpListener(); - var httpUrl = $"{Uri.UriSchemeHttp}{Uri.SchemeDelimiter}{host.Host}:{host.Port}/"; + var hostScheme = host.Host.ToLower(); + + switch (hostScheme) + { + case "0.0.0.0": + case "localhost": + case "::": + case "*": + case ".": + hostScheme = "*"; + break; + } + + var httpUrl = $"{Uri.UriSchemeHttp}{Uri.SchemeDelimiter}{hostScheme}:{host.Port}/"; server.Prefixes.Add(httpUrl);