swagger-ui is requesting the validator over http even when swagger-ui was loaded over https
I believe the problem is in the following IF block
// Default validator
if(window.location.protocol === 'https') {
this.model.validatorUrl = 'https://online.swagger.io/validator';
}
in my browser (Chrome Version 43.0.2357.130 m (64-bit))
window.location.protocol returns https: with a colon :,
However even when I changed that line to:
if((window.location.protocol).indexOf('https') !== -1) {
I still get a Mixed Content warning in the console saying that my page requested an insecure image.
You can disable the validator by using:
validatorUrl: null
Put this in the area where you render the SwaggerUi object
#1427 offers a partial fix. However, right now we don't really host the validator on https (it will redirect to http).
so no chance you will ever host a validator behind https? its pretty annoying.
we will move it under https. It just doesn't happen automatically, so it takes a bit of time.
Would be great if you could move the validator to https.
@guido4000 - it's already running on https as well.
@webron I do get redirected from
https://online.swagger.io/validator to
http://online.swagger.io/validator/