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

feat: recognize HTTPS via proxy #7765

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

jennifer-richards
Copy link
Member

This will cause Django to treat HTTPS connections to CloudFlare as secure. This will cause it to generate https://... URLs when generating absolute URLs despite seeing non-TLS proxied requests.

Before deploying this, we should confirm that CloudFlare is behaving as required in the warning at https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header. We also need to be sure we never deploy this setting without a proxy that handles the X-Forwarded-Proto header as required.

@jennifer-richards
Copy link
Member Author

For the record: we've successfully confirmed Cloudflare's X-Forwarded-Proto handling, and it does indeed send it set to https for an incoming https request.

@rjsparks rjsparks merged commit b13a606 into ietf-tools:main Aug 5, 2024
2 checks passed
@jennifer-richards jennifer-richards deleted the secure-header branch August 5, 2024 14:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants