🐛 Fix certificate loading

This commit is contained in:
2025-07-20 16:55:46 +08:00
parent 4557631153
commit 608414bfda

View File

@@ -24,12 +24,6 @@ public static class KestrelConfiguration
// Load PEM cert and key manually
var certificate = X509Certificate2.CreateFromPemFile(certPath, keyPath);
// You MUST call this to make sure the key is usable
certificate = certificate.CopyWithPrivateKey(
RSA.Create()
);
// Now pass the full cert
options.ListenAnyIP(5001, listenOptions =>
{