Yurik has uploaded a new change for review.

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

Change subject: Move 250-99 to unified except opera-mini
......................................................................

Move 250-99 to unified except opera-mini

Carrier 250-99 starts using unified design except for opera mini.

Change-Id: I3ce7975705bd704f140a397f2233928a21ab39bd
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 23 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/150416/1

diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index 3d0ced3..2207bc6 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -169,12 +169,6 @@
                                        set req.http.X-CS = req.http.X-CS2;
                                }
                        }
-               } else if (req.http.X-CS2 == "250-99") {
-                       if (!req.http.X-Forwarded-Proto && 
(!req.http.X-Forwarded-By || req.http.X-Forwarded-By == "Opera")) {
-                               if (req.http.host ~ "^((ru|en)\.)?(zero|m)\.") {
-                                       set req.http.X-CS = req.http.X-CS2;
-                               }
-                       }
                } else if (req.http.X-CS2 == "410-01") {
                        if (!req.http.X-Forwarded-Proto && 
(!req.http.X-Forwarded-By || req.http.X-Forwarded-By == "Opera")) {
                                if (req.http.host ~ "^((en|ur)\.)?(zero|m)\.") {
@@ -243,8 +237,11 @@
                                        set req.http.X-CS = req.http.X-CS2;
                                }
                        }
-               } else if (req.http.X-CS2 == "426-04" ||
-                                  req.http.X-CS2 ~ "^TESTON.*") {
+               } else if ((req.http.X-Forwarded-By != "Opera" && (
+                                       req.http.X-CS2 == "426-04" ||
+                                       req.http.X-CS2 == "250-99"
+                                       )) ||
+                                   req.http.X-CS2 ~ "^TESTON.*") {
                        //
                        // Each carrier migrated to the unified design must be 
moved to the vcl_deliver so that analytics stays current
                        //
@@ -254,6 +251,18 @@
                        } else {
                                set req.http.X-CS = "ON";
                        }
+
+                       /* These are opera-mini leftovers */
+
+               } else if (req.http.X-CS2 == "250-99") {
+                       if (!req.http.X-Forwarded-Proto) {
+                               if (req.http.host ~ "^((ru|en)\.)?(zero|m)\.") {
+                                       set req.http.X-CS = req.http.X-CS2;
+                               }
+                       }
+
+                       /* End of opera-mini leftovers */
+
                } else if (req.http.X-CS2 ~ "^TEST.*") {
                        // Test carrier allows all proxies and SSL
                        set req.http.X-ZeroTLS = "1";
@@ -324,6 +333,12 @@
                                if (!req.http.X-Forwarded-By) {
                                        set req.http.X-CS = req.http.X-CS2;
                                }
+                       } else if (req.http.X-CS2 == "250-99") {
+                               if (!req.http.X-Forwarded-Proto && 
!req.http.X-Forwarded-By) {
+                                       if (req.http.host ~ 
"^((ru|en)\.)?(zero|m)\.") {
+                                               set req.http.X-CS = 
req.http.X-CS2;
+                                       }
+                               }
                        } else {
                                set req.http.X-CS = req.http.X-CS2;
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ce7975705bd704f140a397f2233928a21ab39bd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yurik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to