-
-
Notifications
You must be signed in to change notification settings - Fork 748
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
Add support for [*]
in trusted hosts
#2480
Conversation
@Kludex requesting your review and inputs for this PR :) |
@@ -65,7 +65,7 @@ def make_httpx_client( | |||
"::11.22.33.44", # This is a dual address | |||
] | |||
_TRUSTED_IPv6_NETWORKS = "2001:db8:abcd:0012::0/64" | |||
_TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar" | |||
_TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar, garba*gewith*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably have an assertive test case with *
, can you add [*]
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test case with trust host using ["*"]
, It's similar to the existing trust everything so I did not add every address as an input.
Please change the title as well. |
[*]
in trusted hosts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. :)
* fixed trusted host parsing for always trust case * Update uvicorn/middleware/proxy_headers.py * added test case for trust everything using list --------- Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Summary
Fixed trusted host parsing for always trust case.
This PR will fix allowing all networks upon passing
--forwarded-allow-ips
as*
from gunicorn with uvicorn as a worker class.The fix ensures that gunicorn integration and uvicorn as a standalone application will work fine for storing and validating trusted networks.
Complete RCA is present on issue: #2477
Checklist