From c409bb7c6688d8f294375e1c549495e6dd637b04 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 2 Jul 2019 17:58:50 -0400 Subject: [PATCH] LP1834208 Update proxy example configuration files The examples/haproxy/osrf-ws-http-proxy file needed a syntax correction with the listen directive. Remove X-Real-IP lines from the examples/nginx/osrf-ws-http-proxy configuration, and remove the X-Client-IP line from the examples/haproxy/osrf-ws-http-proxy configuration. These entries are redundant when X-Forwarded-For is being used. This latter change also suggests changes in the Evergreen Apache 2 configuration examples. Signed-off-by: Jason Stephenson Signed-off-by: Jason Boyer Signed-off-by: Ben Shum --- examples/haproxy/osrf-ws-http-proxy | 4 ++-- examples/nginx/osrf-ws-http-proxy | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/haproxy/osrf-ws-http-proxy b/examples/haproxy/osrf-ws-http-proxy index ba84667..1db4cd6 100644 --- a/examples/haproxy/osrf-ws-http-proxy +++ b/examples/haproxy/osrf-ws-http-proxy @@ -1,7 +1,7 @@ -listen web 0.0.0.0:80 +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.43.2