HTTP directives

proxy_set_header directive (HTTP)

HTTP, server or location. Sets upstream request fields; an empty value omits the field. Parent directives inherit only when no local definitions exist. Ordinary HTTP/1.x defaults set Host to $proxy_host and Connection to close.

Formal Syntax & Structure

nginx syntaxnginx
proxy_set_header field value;

Parameters & Attributes

NameTypeDescription
fieldstringHeader name
valuestringLiteral or variable expression

Working Example

Example Snippetnginx
proxy_set_header Host catalog.test;
Nginx Reference