I am using jwilder nginx proxy container with custom HTTPS port and unable to figure out why the reverse proxy redirects to http instead of https. I have to enter the URL twice with https to load the page or else it keeps on redirecting to http. On the browser development tools, i can see it returns 302 code with location that doesn't contain https.
Not sure how to fix that. Gone through the documentation and it suggested to use HTTPS_METHOD set to nohttp but that didn't fix the issue either.
The docker-compose file looks something like this:
superset:
env_file: docker/.env-non-dev
image: *superset-image
container_name: superset_app
command: ["/app/docker/docker-bootstrap.sh", "app-gunicorn"]
user: "root"
restart: unless-stopped
ports:
- 8088:8088
depends_on: *superset-depends-on
volumes: *superset-volumes
environment:
CERT_NAME: superset.local
VIRTUAL_PORT: 8088
VIRTUAL_HOST: superset.upstream
HTTPS_PORT: 4443
HTTPS_METHOD: nohttp
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "4443:4443"
volumes:
- .certs:/etc/nginx/certs
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
DEFAULT_HOST: superset.upstream
HTTPS_PORT: 4443
CERT_NAME: superset.local
HTTPS_METHOD: nohttp
HSTS: 'off'