You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by gi...@git.apache.org on 2017/08/21 16:14:59 UTC

[GitHub] dennisobrien opened a new issue #978: redirects change https requests to http locations

dennisobrien opened a new issue #978: redirects change https requests to http locations
URL: https://github.com/apache/incubator-superset/issues/978
 
 
   I'm running Caravel in AWS with this configuration:
   - ELB terminates SSL (and accepts only https requests)
   - Docker container runs gunicorn + caravel
   
   Many requests hang in the browser because the https request is redirected to a http location.
   
   ```
   $ curl -Ik https://caravel.example.com/
   HTTP/1.1 302 FOUND
   Content-Length: 239
   Content-Type: text/html; charset=utf-8
   Date: Thu, 18 Aug 2016 16:30:20 GMT
   Location: http://caravel.example.com/caravel/welcome
   Server: gunicorn/19.6.0
   Connection: keep-alive
   ```
   
   I'm not sure if this is an issue with Caravel or upstream in Flask or Flask-AppBuilder.
   
   I tried setting `PREFERRED_URL_SCHEME = 'https'` in caravel_config.py hoping that would propagate to flask, but either it did not propagate, or it had no effect.  (That config instructs flask what scheme to use when it cannot be determined.)
   
   I think the right way to deal with this is to determine the protocol from the 'X-Forwarded-Proto' header.  But I'm not sure if this is a bug in Caravel or Flask.
   
   thanks,
   Dennis
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services