A clear and concise description of what the bug is. Hi Everyone, I am trying to configure SSL for superset on apache. However, my setup doesn't work. I am running superset locally on port 9020, but since I can't bind apache on the same port I have configured SSL for the UI on port 8080 with a proxy pass that forwards requests locally to port 9020. Currently, any requests to mysuperset:9020 fail with the 404 error: The plain HTTP request was sent to HTTPS port, but after a few attempts of forcing https it finally redirects to the superset login page.

Expected results

mysuperset:9020 should redirect successfully to https

Actual results

HTTP error 404: The plain HTTP request was sent to HTTPS port

Screenshots

Apache Superset Issue running apache superset with https

Environment

(please complete the following information):

  • superset version: 0.34
  • python version: 3.6
  • aws centos 7 ec2 instance
  • ELB configured

superset logs: 2020-01-31 07:01:46,187:INFO:werkzeug:10.100.4.34 - - [31/Jan/2020 07:01:46] "GET / HTTP/1.1" 302 - 2020-01-31 07:01:48,897:INFO:werkzeug:10.100.4.34 - - [31/Jan/2020 07:01:48] "GET /superset/welcome HTTP/1.1" 302 - 2020-01-31 07:01:58,855:INFO:werkzeug:10.100.3.150 - - [31/Jan/2020 07:01:58] "GET / HTTP/1.1" 302 -

Comment From: stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Comment From: willbarrett

@pure-zests it might be better to bind Superset to 127.0.0.1 so that it's inaccessible from outside the local loopback. Then you can bind Apache to 80 and 443, and have Apache handle the redirect from HTTP -> HTTPS. If you need to handle the redrect from 9020, I'd recommend moving Superset to another port and again handling the redirect in Apache. I hope this helps!

Comment From: stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Comment From: mistercrunch

This has been discussed numerous times in other issues and isn't really a Superset issue per-se, closing.

Comment From: ashokpush

@mistercrunch, can you ping me the link for the issue where it is resolved, if you have it handy.

Comment From: kenske

Fixed this by updating the request headers in my HTTPRoute configuration:

      filters:
        - type: RequestHeaderModifier
          requestHeaderModifier:
            set:
              - name: X-Forwarded-Proto
                value: "https"
              - name: X-Forwarded-Port
                value: "443"