BBlack has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/383353 )
Change subject: WMF-Last-Access-Global: not for wikimedia.org
......................................................................
WMF-Last-Access-Global: not for wikimedia.org
Bug: T174640
Change-Id: I61aafa5dee8b1ea896bfcdb84b0d15e8b356d4b9
---
M modules/varnish/templates/analytics.inc.vcl.erb
1 file changed, 19 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/53/383353/1
diff --git a/modules/varnish/templates/analytics.inc.vcl.erb
b/modules/varnish/templates/analytics.inc.vcl.erb
index e76fc77..9504391 100644
--- a/modules/varnish/templates/analytics.inc.vcl.erb
+++ b/modules/varnish/templates/analytics.inc.vcl.erb
@@ -101,22 +101,23 @@
}
/*
- * WMF-Last-Access-Global
+ * WMF-Last-Access-Global (not for wikimedia.org)
*/
- if(req.http.X-WMF-LastGlobalStamp) {
- set resp.http.X-Analytics = resp.http.X-Analytics
- + ";WMF-Last-Access-Global="
- + req.http.X-WMF-LastGlobalStamp;
+ if(req.http.Host !~ "\.wikimedia\.org$") {
+ if(req.http.X-WMF-LastGlobalStamp) {
+ set resp.http.X-Analytics = resp.http.X-Analytics
+ + ";WMF-Last-Access-Global="
+ + req.http.X-WMF-LastGlobalStamp;
- // re-set the cookie if it's not from today
- if (req.http.X-NowDay != req.http.X-WMF-LastGlobalStamp) {
+ // re-set the cookie if it's not from today
+ if (req.http.X-NowDay != req.http.X-WMF-LastGlobalStamp) {
+ call set_last_access_global_cookie__;
+ }
+ }
+ else {
+ // sets the initial cookie if no valid one existed
call set_last_access_global_cookie__;
}
-
- }
- else {
- // sets the initial cookie if no valid one existed
- call set_last_access_global_cookie__;
}
// we could clean up req.http.X-WMF-LastStamp + req.http.X-NowDay
@@ -173,7 +174,12 @@
}
call analytics_last_access_recv_;
- call analytics_last_access_global_recv_;
+
+ // Global last access cookies not used w/ wikimedia.org
+ if(req.http.Host !~ "\.wikimedia\.org$") {
+ call analytics_last_access_global_recv_;
+ }
+
call analytics_provenance_recv_;
}
--
To view, visit https://gerrit.wikimedia.org/r/383353
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I61aafa5dee8b1ea896bfcdb84b0d15e8b356d4b9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits