You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the above option does nothing, and it's not the only one. Why are there pairs of boolean options such that one of them does nothing? We don't even know what the defaults are, without searching the code.
When binding to a UNIX socket, we need to also add --forwarded-allow-ips='*'. This is mentioned in the documentation, but it's quite unexpected and easy to miss. I missed it, and spent a lot of time trying to understand why my requests passed to Django are not considered secure, and looking for workarounds.
Shouldn't --forwarded-allow-ips='*' be the default when --uds is used? Currently passing the * makes me feel like I'm doing something wrong security-wise.
If not, then maybe at least it could be described in the documentation whenever --uds is described, e.g. here and in uvicorn --help.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to report some details that I found confusing when configuring Uvicorn with Nginx (https://www.uvicorn.org/deployment/#running-behind-nginx).
The documentation warns to "ensure [...] that Uvicorn is run using the
--proxy-headers
setting". However, this is the default:uvicorn/uvicorn/main.py
Lines 221 to 224 in d79f285
So the above option does nothing, and it's not the only one. Why are there pairs of boolean options such that one of them does nothing? We don't even know what the defaults are, without searching the code.
When binding to a UNIX socket, we need to also add
--forwarded-allow-ips='*'
. This is mentioned in the documentation, but it's quite unexpected and easy to miss. I missed it, and spent a lot of time trying to understand why my requests passed to Django are not considered secure, and looking for workarounds.--forwarded-allow-ips='*'
be the default when--uds
is used? Currently passing the*
makes me feel like I'm doing something wrong security-wise.--uds
is described, e.g. here and inuvicorn --help
.Beta Was this translation helpful? Give feedback.
All reactions