- # Do not pass cookies to backends.
- proxy_set_header Cookie '';
- # Do not pass Accept-Encoding to backends.
- proxy_set_header Accept-Encoding '';
- # Do not pass Accept to backends.
- proxy_set_header Accept '';
- # Do not pass Accept-Language to backends as unused.
- proxy_set_header Accept-Language '';
- proxy_set_header Accept-Charset '';
- # Do not send origin, we allow all.
- proxy_set_header origin '';
- # Do not pass invalid headers to backend.
- proxy_set_header X-Forwarded-Host '';
- proxy_set_header X-Host '';
- proxy_set_header Authorization '';
- proxy_set_header Proxy-Authorization '';
-
- # Drop partial requests
- proxy_set_header range '';
+ # Drop all request headers and request body
+ proxy_pass_request_headers off;
+ proxy_pass_request_body off;