By default, NGINX modifies two header fields in proxied requests, “Host” and “Connection”, and eliminates the header fields whose values are empty strings.
To change these settings, as well as modify other header fields, use the proxy_set_header directive.
For example:
location /some/path/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://localhost:8000; }
NOTE: In this configuration the “Host” field is set to the $host variable.
Set it to an empty string as follows:
location /some/path/ { proxy_set_header Accept-Encoding ""; proxy_pass http://localhost:8000; }