From 7d0d43f09206ec33125460e47154b41a8510b4d3 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 2 Jul 2019 12:49:49 -0400 Subject: [PATCH] Use only X-Forwarded-For in example proxy configurations Remove X-Real-IP lines from the example nginx proxy configuration, and remove the X-Client-IP line from the exampl haproxy configuration. These entries are redundant when X-Forwarded-For is being used. Signed-off-by: Jason Stephenson --- examples/haproxy/osrf-ws-http-proxy | 1 - examples/nginx/osrf-ws-http-proxy | 3 --- 2 files changed, 4 deletions(-) diff --git a/examples/haproxy/osrf-ws-http-proxy b/examples/haproxy/osrf-ws-http-proxy index 6353f5b..1db4cd6 100644 --- a/examples/haproxy/osrf-ws-http-proxy +++ b/examples/haproxy/osrf-ws-http-proxy @@ -2,7 +2,6 @@ listen web bind 0.0.0.0:80 mode http option forwardfor - http-request set-header X-Client-IP %[src] balance roundrobin server web01 localhost:7080 check diff --git a/examples/nginx/osrf-ws-http-proxy b/examples/nginx/osrf-ws-http-proxy index 5d5b45e..e539013 100644 --- a/examples/nginx/osrf-ws-http-proxy +++ b/examples/nginx/osrf-ws-http-proxy @@ -20,7 +20,6 @@ server { location / { proxy_pass http://localhost:7080; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; @@ -56,7 +55,6 @@ server { location / { proxy_pass https://localhost:7443; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; @@ -68,7 +66,6 @@ server { # NGINX, the assumption is it runs w/o SSL. Change to taste. proxy_pass http://localhost:7682; - proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Needed for websockets proxying. -- 2.11.0