Conflicting secure headers cause request parsing failure
warningconfigurationUpdated Jan 1, 2024(via Exa)
Technologies:
How to detect:
When multiple secure headers are present in request (e.g., X-Forwarded-SSL: on and X-Forwarded-Proto: http) and disagree about HTTPS usage, Gunicorn raises InvalidSchemeHeaders exception causing request to fail.
Recommended action:
Configure front-end proxy to send only one consistent secure header (e.g., only X-Forwarded-Proto). Review secure_scheme_headers and remove unused header mappings. Audit proxy configuration for header consistency.