HTTP variables

$proxy_add_x_forwarded_for variable (HTTP)

Incoming X-Forwarded-For plus the effective client address, or the effective address alone if absent. Does not authenticate prior claims.

Formal Syntax & Structure

nginx syntaxnginx
$proxy_add_x_forwarded_for

Working Example

Example Snippetnginx
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Nginx Reference