Closed tomer-cohen closed 2 years ago
Thanks for opening this pull request! If you have implemented new functions, write about them in the readme file.
Hi, thanks. This will be released as version 5.1.0
in a few minutes.
Hey guys, I saw this and was wondering: is this intended to be used this way? (See example below)
"Config": [
{
"DangerousAcceptAnyServerCertificateValidator": true,
"Name": "Shipping API",
"Version": "v1",
"Url": "https://localhost:7020/swagger/v1/swagger.json"
}
]
Hi @AndryKwiatow,
No. Property DangerousAcceptAnyServerCertificateValidator
should be set in the route configuration.
E.g.:
"Routes": [
{
"DownstreamPathTemplate": "/api/{everything}",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 5100
}
],
"UpstreamPathTemplate": "/api/contacts/{everything}",
"SwaggerKey": "contacts",
"DangerousAcceptAnyServerCertificateValidator": true
}
]
As mentioned in this issue: https://github.com/Burgyn/MMLib.SwaggerForOcelot/issues/82
This check for the DangerousAcceptAnyServerCertificateValidator flag in the route settings, if it's set to true - the ssl certificate validation will be skipped when trying to retrieve swagger.json.