Stwalkerster has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106907


Change subject: dynamicproxy: Pass through existing XFF data too
......................................................................

dynamicproxy: Pass through existing XFF data too

This changes the XFF configuration of nginx to pass through the existing
XFF data through the proxy, so if there are multiple levels of proxies
then the web application behind these can use the data.

This is needed for the account-creation-assistance project on Labs, as
sometimes we see people come through proxies which are on the TrustedXFF
list, and it is beneficial to us to be able to get the same IP address
that Wikipedia itself will then use.

This is completely untested - I don't know nginx and I got my
information from 
http://www.networkinghowtos.com/howto/set-the-x-forwarded-for-header-on-a-nginx-reverse-proxy-setup/

Change-Id: Ib27796b464998f6f384dff155a60f712c3ad7d94
---
M modules/dynamicproxy/templates/proxy.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/106907/1

diff --git a/modules/dynamicproxy/templates/proxy.conf 
b/modules/dynamicproxy/templates/proxy.conf
index 58bed0c..86a721b 100644
--- a/modules/dynamicproxy/templates/proxy.conf
+++ b/modules/dynamicproxy/templates/proxy.conf
@@ -71,7 +71,7 @@
 
         <%- if @set_xff -%>
         # Passes client's IP to the backend
-        proxy_set_header X-Forwarded-For $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         <%- end -%>
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/106907
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib27796b464998f6f384dff155a60f712c3ad7d94
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Stwalkerster <si...@stwalkerster.co.uk>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to