Skip to content

Fixed nginx X-Forwarded-Proto to match the protocol ("http", "https")#617

Merged
catborise merged 2 commits intoretspen:masterfrom
0x6d61726b:patch-01_X-Forwarded-Proto
Oct 30, 2023
Merged

Fixed nginx X-Forwarded-Proto to match the protocol ("http", "https")#617
catborise merged 2 commits intoretspen:masterfrom
0x6d61726b:patch-01_X-Forwarded-Proto

Conversation

@0x6d61726b
Copy link
Copy Markdown
Contributor

According to the specification of X-Forwarded-Proto, the value shall match the used protocol (e.g., "http", "https") which is provided as scheme variable in nginx.

@0x6d61726b
Copy link
Copy Markdown
Contributor Author

After my browser cache has expired, Gunicorn webserver returned a "Contradictory scheme headers" error.
According to benoitc/gunicorn#1857 Gunicorn uses the X-Forwarded-Proto value as protocol used between the proxy and itself, whereas X-Forwarded-Proto is defined as protocol between client and proxy.

@catborise catborise merged commit 8995f47 into retspen:master Oct 30, 2023
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.

2 participants