[Answer]-Django LOGIN_REDIRECT_URL not working behind nginx ssl

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;
}

Leave a comment