Skip to content

Document HTTP_* parameter suppression in *_param directives - #309

Open
ac000 wants to merge 1 commit into
nginx:mainfrom
ac000:docs/param-http-empty-suppress
Open

Document HTTP_* parameter suppression in *_param directives#309
ac000 wants to merge 1 commit into
nginx:mainfrom
ac000:docs/param-http-empty-suppress

Conversation

@ac000

@ac000 ac000 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Adds a paragraph to the fastcgi_param, uwsgi_param, and scgi_param directive documentation describing the empty-value HTTP_* suppression idiom.

For all three modules, if a *_param directive names a parameter beginning with HTTP_ and gives it a literal empty string as its value, the parameter is not passed to the upstream server and the corresponding client request header field is also suppressed from auto-forwarding. This is a deliberate idiom (used e.g. to strip HTTP_AUTHORIZATION before forwarding) but was not documented, leading to confusion — see nginx/nginx#484.

Behaviour verified in ngx_http_uwsgi_module.c L2192–2210, ngx_http_fastcgi_module.c L3478–3494, and ngx_http_scgi_module.c L1869–1885.

For fastcgi_param, uwsgi_param, and scgi_param, if the parameter
name begins with HTTP_ and its value is set to an empty string,
neither the parameter nor the corresponding client request header
field is passed to the upstream server.

This behaviour is a deliberate idiom for stripping a request header
from what is forwarded to the backend, but had not been documented.

Assisted-by: GitHub Copilot:claude-opus-4.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant