HTTP variables

$http_* variable family (HTTP)

Read an incoming header using its lowercase name with hyphens mapped to underscores, for example $http_x_lab_color. Missing fields may yield an empty value; client input is not proof of identity. The existing $http_host entry remains a specific example. The asterisk represents a name suffix, not literal configuration syntax. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.

Formal Syntax & Structure

nginx syntaxnginx
$http_*

Working Example

Example Snippetnginx
# Partial http-context example: map a synthetic value to a presence flag, never log the raw value.map $http_x_lab_color $lab_present {    "" 0;    default 1;}
Nginx Reference