From d594f9d794c0b8c162751d756329dbc7da9c48db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Tue, 3 Aug 2021 14:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=ADwindows=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs b/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs index da4272a..8ae55c0 100644 --- a/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs +++ b/FastGithub.ReverseProxy/KestrelServerOptionsExtensions.cs @@ -64,7 +64,10 @@ namespace FastGithub kestrel.Listen(IPAddress.Any, HTTPS_PORT, listen => listen.UseHttps(https => { - https.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13; + if (OperatingSystem.IsWindows() && Environment.OSVersion.Version < new Version(6, 2)) + { + https.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13; + } https.ServerCertificateSelector = (ctx, domain) => certService.GetOrCreateServerCert(domain); })); }