1👍
It was happening to me until I added proxy_set_header X-Forwarded-Proto $scheme
to nginx’s configuration:
location / {
proxy_pass http://unix:/path/to/your/gunicorn_socket;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Source:stackexchange.com