From b80f2f99730887a4460a511c6f101c11eb003183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20N=C3=A4geli?= Date: Mon, 18 Nov 2024 12:32:26 +0100 Subject: [PATCH] ... --- GenHTTP.Gateway/Engine.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/GenHTTP.Gateway/Engine.cs b/GenHTTP.Gateway/Engine.cs index 261c60d..f887dbe 100644 --- a/GenHTTP.Gateway/Engine.cs +++ b/GenHTTP.Gateway/Engine.cs @@ -18,11 +18,19 @@ public static IServerHost Setup(Environment environment, GatewayConfiguration co ushort port = 80, ushort securePort = 443) { var server = Host.Create() - .Bind(IPAddress.Any, port) - .Bind(IPAddress.IPv6Any, port) .Defaults(secureUpgrade: false) .Console(); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + server.Bind(IPAddress.Any, port) + .Bind(IPAddress.IPv6Any, port); + } + else + { + server.Bind(IPAddress.Any, port); + } + var certificateProvider = CertificateLoader.GetProvider(environment, config); if (certificateProvider != null)