Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: configure gunicorn secure_scheme_headers #8630

Conversation

jennifer-richards
Copy link
Member

Instead of training Django to look at the request headers, this configures gunicorn only to respect X-Forwarded-Proto. It sets wsgi.url_scheme, which is used by Django's request.is_secure() to decide whether a forwarded request is actually secure.

Draft while I look back to make sure there wasn't some other corner where we needed the SECURE_PROXY_SSL_HEADER setting.

@jennifer-richards
Copy link
Member Author

As far as I can tell it'll be ok to make the change to the django config, but I don't think we should do that right before a meeting just in case. I'm going to close this and create distinct PRs instead.

@jennifer-richards jennifer-richards deleted the secure-scheme-headers branch March 3, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant