A platform for community discussion. Free, open, simple.
FIX: Scrub `Client-Ip` request header in nginx (#30971)
Alan Guo Xiang Tan3764c6d8093f
diff --git a/config/nginx.sample.conf b/config/nginx.sample.confindex 03401efc228..b8873880313 100644--- a/config/nginx.sample.conf+++ b/config/nginx.sample.conf@@ -109,6 +109,7 @@ server {proxy_set_header X-Forwarded-Proto $thescheme;proxy_set_header X-Sendfile-Type "";proxy_set_header X-Accel-Mapping "";+ proxy_set_header Client-Ip "";proxy_pass http://discourse;break;}@@ -121,6 +122,7 @@ server {proxy_set_header X-Forwarded-Proto $thescheme;proxy_set_header X-Sendfile-Type "";proxy_set_header X-Accel-Mapping "";+ proxy_set_header Client-Ip "";proxy_pass http://discourse;break;}@@ -141,6 +143,7 @@ server {proxy_set_header X-Forwarded-Proto $thescheme;proxy_set_header X-Sendfile-Type "";proxy_set_header X-Accel-Mapping "";+ proxy_set_header Client-Ip "";proxy_pass http://discourse;break;}@@ -244,6 +247,7 @@ server {proxy_set_header X-Forwarded-Proto $thescheme;proxy_set_header X-Sendfile-Type "";proxy_set_header X-Accel-Mapping "";+ proxy_set_header Client-Ip "";# if Set-Cookie is in the response nothing gets cached# this is double bad cause we are not passing last modified in@@ -270,6 +274,7 @@ server {proxy_set_header X-Forwarded-Proto $thescheme;proxy_set_header X-Sendfile-Type "";proxy_set_header X-Accel-Mapping "";+ proxy_set_header Client-Ip "";proxy_http_version 1.1;proxy_buffering off;proxy_pass http://discourse;@@ -293,6 +298,7 @@ server {proxy_set_header X-Forwarded-Proto $thescheme;proxy_set_header X-Sendfile-Type "";proxy_set_header X-Accel-Mapping "";+ proxy_set_header Client-Ip "";proxy_pass http://discourse;}