.net-core - Ocelot 使用“DangerousAcceptAnyServerCertificateValidator”禁用 SSL 验证
问题描述
添加自签名证书后出现问题,请求在网关处被阻止并显示消息
无法建立 SSL 连接,请参阅内部异常。---> System.Security.Authentication.AuthenticationException:根据验证程序,远程证书无效。
然后我发现可以通过在配置中添加它来禁用验证
"DangerousAcceptAnyServerCertificateValidator": true
但仍然有同样的问题和同样的错误。
解决方案
您提到的以下指令对我来说很好。
"DangerousAcceptAnyServerCertificateValidator": true
我使用 Ocelot 16.0.1。文档在这里 https://ocelot.readthedocs.io/en/latest/features/configuration.html
推荐阅读
- python - 无和之间的区别
- python - Keras 深度学习模型在训练中总是给出相同的 acc
- ios - Xcode 无法为 ios 13.3.1 设备构建颤振代码,但在 13.3 ios 模拟器上运行代码
- c - malloc中的内存泄漏?
- acumatica - 有谁知道如何从 Acumatica 中的通用查询访问 MRP 详细查询结果?
- terraform - RDS 实例不在 localstack 中创建
- php - Twig 如何在 JSON 中进行插值
- swift - NSSplitViewController 不调用委托方法
- sql-server - 如何从破折号分隔的字符串中返回以完整单词结尾的前 N 个字符?
- vba - 如何在关闭 Chrome 之前等待文件下载完成?