Stream Real IP directives
set_real_ip_from directive (stream)
stream, server; trusts specified sources of PROXY metadata for address replacement. Optional stream Real IP module, since 1.11.4.
Formal Syntax & Structure
nginx syntaxnginx
set_real_ip_from address | CIDR | unix:;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| source | IP address | CIDR | unix: | Authorize only controlled peers to replace the client address and port; inbound listener must accept PROXY protocol. |
Working Example
Example Snippetnginx
set_real_ip_from 192.0.2.10;