Merge pull request #5757 from agile6v/stream

feat: support to define trusted addresses for proxy protocol in stream block
This commit is contained in:
Kubernetes Prow Robot 2020-09-01 17:29:07 -07:00 committed by GitHub
commit 33cab380ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 72 additions and 0 deletions

View file

@ -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