You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/12/23 20:54:43 UTC

[GitHub] [superset] aksy121 commented on issue #17126: Superset redirects to http from https

aksy121 commented on issue #17126:
URL: https://github.com/apache/superset/issues/17126#issuecomment-1000519393


   @cintoSunny There is one mistake I see in your annotations. Actually the doc mentions to add a request header while the `more_set_headers` add a response header. Below configurations changes worked for me:
   
   1. Add request headers using custom configmap as per nginx ingress documentation:
   ```
   apiVersion: v1
   data:
     X-Forwarded-Proto: "https"
   kind: ConfigMap
   metadata:
     name: custom-headers
     namespace: ingress-nginx
   ```
   2. Refer to the above custom configmap in the configmap passed to nginx-ingress command (`--configmap=$(POD_NAMESPACE)/ingress-nginx-controller`). `proxy-set-headers` is the important part here which sets it as request header:
   ```
   apiVersion: v1
   data:
     proxy-set-headers: "ingress-nginx/custom-headers"
   kind: ConfigMap
   metadata:
     name: private-nginx-controller
     namespace: nginx
   ```
   3. Add below flags to superset config:
   ```
   ENABLE_PROXY_FIX = True
   PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 0, "x_prefix": 1}
   ```
   I'm setting `"x_port": 0` in PROXY_FIX_CONFIG without which I was getting Location as https://superset.example.com:80/. This combination of 3 changes fixed it form me. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org