feat: support to define trusted addresses for proxy protocol in stream block
This commit is contained in:
parent
96d190d708
commit
609e1b5775
2 changed files with 72 additions and 0 deletions
|
|
@ -705,6 +705,12 @@ stream {
|
|||
|
||||
error_log {{ $cfg.ErrorLogPath }};
|
||||
|
||||
{{ if $cfg.EnableRealIp }}
|
||||
{{ range $trusted_ip := $cfg.ProxyRealIPCIDR }}
|
||||
set_real_ip_from {{ $trusted_ip }};
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
upstream upstream_balancer {
|
||||
server 0.0.0.1:1234; # placeholder
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue