Skip to content

feat: recognize HTTPS via proxy#7765

Merged
rjsparks merged 2 commits intoietf-tools:mainfrom
jennifer-richards:secure-header
Aug 5, 2024
Merged

feat: recognize HTTPS via proxy#7765
rjsparks merged 2 commits intoietf-tools:mainfrom
jennifer-richards:secure-header

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
@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