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

https spec is loaded via http #243

Closed
SSANSH opened this issue Mar 28, 2017 · 4 comments
Closed

https spec is loaded via http #243

SSANSH opened this issue Mar 28, 2017 · 4 comments
Labels

Comments

@SSANSH
Copy link

SSANSH commented Mar 28, 2017

its seems that Redoc fetch swagger without cors header? can you please confirm?

please let me know if they have an redoc option in order to add header on request.

Fetch API cannot load http://x.com/docs. Redirect from 'x.com/docs' to 'https://x.com/docs' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.244.129:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

@RomanHotsiy
Copy link
Member

No 'Access-Control-Allow-Origin' header is present on the requested resource

that means requested resource (server) doesn't return Access-Control-Allow-Origin header. This is a question to the http://x.com resource owner not to ReDoc.

@SSANSH
Copy link
Author

SSANSH commented Mar 28, 2017

in fact on http server I don't have Access control because http server just redirect to https server which provide access control.
I don't know how to retrieve a swagger file on https directly with redoc.
Even if I specify https on my code, redoc fetch document with http.

var apis = [
{
name: 'api boilerplate',
url: 'https://x.com'
}
}

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Mar 28, 2017

@SSANSH thanks for clarification. I can reproduce it on my end. Will check and fix.

@RomanHotsiy RomanHotsiy reopened this Mar 28, 2017
@RomanHotsiy RomanHotsiy changed the title CORS fetch https spec is loaded via http Mar 28, 2017
@RomanHotsiy
Copy link
Member

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

No branches or pull requests

2 participants