LP1834208 Update proxy example configuration files
authorJason Stephenson <jason@sigio.com>
Tue, 2 Jul 2019 21:58:50 +0000 (17:58 -0400)
committerBen Shum <ben@evergreener.net>
Sun, 21 Jul 2019 19:51:37 +0000 (15:51 -0400)
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 <jason@sigio.com>
Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Ben Shum <ben@evergreener.net>
examples/haproxy/osrf-ws-http-proxy
examples/nginx/osrf-ws-http-proxy

index ba84667..1db4cd6 100644 (file)
@@ -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
 
index 5d5b45e..e539013 100644 (file)
@@ -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.