HTTP variables
$proxy_host variable (HTTP)
Identifies the configured proxy destination by host and optional port, not the client-supplied Host header or necessarily the selected peer IP. No positional arguments. Use the example only with a synthetic origin; do not expose internal routing metadata to public clients.
Formal Syntax & Structure
nginx syntaxnginx
$proxy_hostWorking Example
Example Snippetnginx
proxy_set_header X-Lab-Origin $proxy_host;