Use only X-Forwarded-For in example proxy configurations user/dyrcona/lp1834208-purge-apache2-websockets-wip
authorJason Stephenson <jason@sigio.com>
Tue, 2 Jul 2019 16:49:49 +0000 (12:49 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 2 Jul 2019 16:49:49 +0000 (12:49 -0400)
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 <jason@sigio.com>
examples/haproxy/osrf-ws-http-proxy
examples/nginx/osrf-ws-http-proxy

index 6353f5b..1db4cd6 100644 (file)
@@ -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
 
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.