首页 > 解决方案 > Ocelot 使用“DangerousAcceptAnyServerCertificateValidator”禁用 SSL 验证

问题描述

添加自签名证书后出现问题,请求在网关处被阻止并显示消息

无法建立 SSL 连接,请参阅内部异常。---> System.Security.Authentication.AuthenticationException:根据验证程序,远程证书无效。

然后我发现可以通过在配置中添加它来禁用验证

"DangerousAcceptAnyServerCertificateValidator": true

但仍然有同样的问题和同样的错误。

标签: .net-coressl-certificateocelot

解决方案


您提到的以下指令对我来说很好。

    "DangerousAcceptAnyServerCertificateValidator": true

我使用 Ocelot 16.0.1。文档在这里 https://ocelot.readthedocs.io/en/latest/features/configuration.html


推荐阅读