Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Nov 18, 2024
1 parent e4c9624 commit b80f2f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions GenHTTP.Gateway/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b80f2f9

Please sign in to comment.