Faidon has submitted this change and it was merged.
Change subject: Varnish: fixes to opera-mini client.ip replacement
......................................................................
Varnish: fixes to opera-mini client.ip replacement
We don't use rnlclientipaddr anywhere in our infrastructure and while at
it, store opera mini's address to X-Orig-Client-IP & drop X-Client-IP.
Change-Id: Ic063e669068d46b207569676bca4dc3cc58d6705
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Faidon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 7e94801..d094fc2 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -431,6 +431,7 @@
/* if the request comes from Opera Mini's accelerating proxies, grab
* XFF Header and replace client ip value */
if (client.ip ~ opera_mini) {
+ set req.http.X-Orig-Client-IP = client.ip;
C{
struct sockaddr_storage *client_ip_ss = VRT_r_client_ip(sp);
struct sockaddr_in *client_ip_si = (struct sockaddr_in *)
client_ip_ss;
@@ -448,9 +449,7 @@
}
}C
- set req.http.X-CLIENT-IP = client.ip;
- set req.http.X-Forwarded-For = client.ip;
- set req.http.X-ORIG-CLIENT-IP = req.http.rlnclientipaddr;
+ unset req.http.X-Forwarded-For;
}
/* This call will always set the following req.http values:
--
To view, visit https://gerrit.wikimedia.org/r/65454
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic063e669068d46b207569676bca4dc3cc58d6705
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits