swagger under https mindfuck
JulienParis opened this issue · comments
Jpy commented
- swagger doc can appear if swagger.json is loaded
- swagger.json is loaded if
@property
def specs_url(self):
'''
The Swagger specifications absolute url (ie. `swagger.json`)
:rtype: str
'''
return url_for(self.endpoint('specs'), _external=False)
in solidata_api.__init__
- nginx is a reverse proxy to redirect request to server
- swagger hostname / base_url is inherited from app.config["SERVER_NAME"]
- if SERVER_NAME == host:port --> swagger.json is loaded but requests from documentation has problems
- if IP:PORT is open + declared in config.prod it could work but not in https
- in case HTTPS nginx fucks up
Jpy commented
also check : noirbizarre/flask-restplus#223