Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger-ui is requesting the validator over http even when swagger-ui was loaded over https #1441

Closed
ftortega opened this issue Jul 2, 2015 · 7 comments

Comments

@ftortega
Copy link

ftortega commented Jul 2, 2015

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.

@shawngong
Copy link
Contributor

You can disable the validator by using:

validatorUrl: null

Put this in the area where you render the SwaggerUi object

@webron
Copy link
Contributor

webron commented Jul 5, 2015

#1427 offers a partial fix. However, right now we don't really host the validator on https (it will redirect to http).

@ftortega ftortega closed this as completed Jul 6, 2015
@danlangford
Copy link

so no chance you will ever host a validator behind https? its pretty annoying.

@fehguy
Copy link
Contributor

fehguy commented Aug 14, 2015

we will move it under https. It just doesn't happen automatically, so it takes a bit of time.

@guido4000
Copy link

Would be great if you could move the validator to https.

@webron
Copy link
Contributor

webron commented Oct 30, 2015

@guido4000 - it's already running on https as well.

@guido4000
Copy link

@webron I do get redirected from
https://online.swagger.io/validator to
http://online.swagger.io/validator/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants