Replies: 1 comment
-
After some recent changes (#2468), you can use network specifiers as well, after looking at the code: https://github.com/encode/uvicorn/blob/master/uvicorn/middleware/proxy_headers.py#L67-L75 So something like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the use case of kubernetes, where the reverse proxy pods can have any IP address looking like
192.168.*.*
. Therefore it would make sense to allow adding IP addresses with wildcards in theforwarded_allow_ips
list, instead of specifying*
to trust everything, or passing in a list of 254^2 (~65000) addresses.All that would be required is a little tweaking in the
ProxyHeadersMiddleware.get_trusted_client_host
methodBeta Was this translation helpful? Give feedback.
All reactions