https只监听ip v4

This commit is contained in:
xljiulang 2021-07-24 20:20:52 +08:00
parent 288a58cc8e
commit 079cc9082d

View File

@ -43,7 +43,7 @@ namespace FastGithub
GeneratorCaCert(caPublicCerPath, caPrivateKeyPath); GeneratorCaCert(caPublicCerPath, caPrivateKeyPath);
InstallCaCert(caPublicCerPath, logger); InstallCaCert(caPublicCerPath, logger);
kestrel.ListenAnyIP(443, listen => kestrel.Listen(IPAddress.Any, 443, listen =>
listen.UseHttps(https => listen.UseHttps(https =>
https.ServerCertificateSelector = (ctx, domain) => https.ServerCertificateSelector = (ctx, domain) =>
GetDomainCert(domain, caPublicCerPath, caPrivateKeyPath))); GetDomainCert(domain, caPublicCerPath, caPrivateKeyPath)));