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

Improve ProxyHeadersMiddleware #2468

Merged
merged 34 commits into from
Sep 27, 2024
Merged

Improve ProxyHeadersMiddleware #2468

merged 34 commits into from
Sep 27, 2024

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Sep 27, 2024

@Kludex Kludex mentioned this pull request Sep 27, 2024
3 tasks
@Kludex Kludex merged commit 84dd2c4 into master Sep 27, 2024
15 checks passed
@Kludex Kludex deleted the proxy-headers-2 branch September 27, 2024 19:38
@b4stien b4stien mentioned this pull request Oct 9, 2024
3 tasks
raf-moreau pushed a commit to raf-moreau/uvicorn that referenced this pull request Nov 5, 2024
* Allow ip ranges for FORWARDED_ALLOW_IPS

* Fix host for empty x-forwarded-for header

* Add multi-host ip-range testcase, run scripts/lint

* Re-run black with line-length 88

* Wrap comments to fit in line-length

* Another missed line-length violation

* Fix __contains__ annotations

* Add support for IPv6

* Fix linting

* Fix test cases

* Update docs, comments

* Update index's usage

* Fix more linting

* Better unix socket support

* Expand proxy documentation

* More docs and code comments

* Refactor common test cases, add cases for UDS

* Update settings docs

* Remove "better UDS handling"

* Remove code leading to coverage failures

* Apply suggestions from code review

Co-authored-by: Marcelo Trylesinski <[email protected]>

* Fixes, and more tests

* Update uvicorn/config.py

Co-authored-by: Marcelo Trylesinski <[email protected]>

* Run ruff formatter

* Replace cast with type: ignore

* remove make_x_headers

* nitpicks

* remove unneeded return

* fix docs

---------

Co-authored-by: Patrick Düggelin <[email protected]>
Co-authored-by: Nicholas Hairs <[email protected]>
Co-authored-by: Nicholas Hairs <[email protected]>
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.

Using ProxyHeadersMiddleware with client on trusted proxy results in invalid client information
3 participants