-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
So what's up with these uwsgi_params:
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
}It looks like they're trying to prevent spoofing some headers that are normally handled by the server. But
- All client headers have
HTTP_prefixed to them. So it's impossible to spoof e.g.REMOTE_ADDRsince it would turn intoHTTP_REMOTE_ADDR. - Conversely, the UWSGI params aren't even overriding the right HTTP headers. If the client sets
X-Real-IP, it will turn into theHTTP_X_REAL_IPuwsgi_param, notX-Real-IP.
These all seem useless, and b773081 doesn't give any justification.
Metadata
Metadata
Assignees
Labels
No labels