Skip to content

Ignore X-Forwarded-Host in get_host()#1303

Merged
davidism merged 3 commits into
pallets:masterfrom
tuukkamustonen:fix-609
May 23, 2018
Merged

Ignore X-Forwarded-Host in get_host()#1303
davidism merged 3 commits into
pallets:masterfrom
tuukkamustonen:fix-609

Conversation

@tuukkamustonen
Copy link
Copy Markdown

@tuukkamustonen tuukkamustonen commented May 15, 2018

Ref #609.

Also:

  • Polished and improved tests a bit.
  • Have get_host() remove standard ports (80, 443)
  • Re-use get_host() in Map#bind_to_environ() to remove duplication.

To get `X-Forwarded-*` headers considered, use `ProxyFix`.

This also adds more tests for werkzeug.wsgi.get_host().
@davidism davidism merged commit 05f8cb6 into pallets:master May 23, 2018
@tuukkamustonen tuukkamustonen deleted the fix-609 branch June 18, 2018 19:20
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2020
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