Set "X-Real-IP" to "$remote_addr"

This commit is contained in:
Alex Kotov 2020-02-11 15:38:13 +05:00
parent 5db801eb24
commit 459918fb01
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,9 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
{% if item.set_x_real_ip_to_remote_addr %}
proxy_set_header X-Real-IP $remote_addr;
{% endif %}
proxy_pass http://{{ item.upstream }};
}