add config option for real-ip header

This commit is contained in:
nd 2021-09-04 23:54:05 +02:00
parent 2032a428a4
commit 1b81731a4b
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 2 additions and 1 deletions

View file

@ -1,5 +1,6 @@
nginx:
add_headers: []
real_ip_header: "X-Forwarded-For"
real_ip_from:
"127.0.0.1": {}
"::1": {}

View file

@ -1,5 +1,5 @@
{% for ip in nginx.real_ip_from %}
set_real_ip_from {{ ip }};
{% endfor %}
real_ip_header X-Forwarded-For;
real_ip_header {{ nginx.real_ip_header }};
real_ip_recursive on;