entrepreneur-interet-general / solidata_backend

first draft for solidata_backend API

Home Page:http://solidata-preprod-api.co-demos.com/api/auth/documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

swagger under https mindfuck

JulienParis opened this issue · comments

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