Closed Bug 642816 Opened 15 years ago Closed 15 years ago

Spark stage : Add a traffic script for mobile detection

Categories

(mozilla.org Graveyard :: Server Operations, task)

task
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: franck.bugzilla, Assigned: oremj)

References

()

Details

This is very similar to bug 640034 for webowonder stage. Please add the following script allowing Zeus to do mobile detection: $ua_f = "(android|fennec|iemobile|ipad|iphone|opera (mini|mobi))"; $mc_f = "mobile"; $ua = string.lowercase(http.getHeader( "User-Agent" )); $mc = http.getCookie($mc_f); if(($mc != "off" && string.regexmatch($ua, $ua_f)) || $mc == "on") { http.addHeader("X-Mobile", 1); http.cache.setkey("mobile"); http.addResponseHeader("Vary", "Cookie,User-Agent"); }
Assignee: nobody → server-ops
Component: spark.mozilla.org → Server Operations
Product: Websites → mozilla.org
QA Contact: spark-mozilla-org → mrz
Version: unspecified → other
Severity: normal → major
OS: Mac OS X → All
Hardware: x86 → All
This should already be active for spark.allizom
Assignee: server-ops → jeremy.orem+bugs
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
On bug 640034 the cookie value in $mc_f is "mamo". This seems to originally come from AMO so I changed it to "mobile" for Spark in the above script and Spark settings. Please confirm which value is configured.
Jeff, can we standardize on one value?
(In reply to comment #3) > Jeff, can we standardize on one value? Yeah, I don't care what it's called. I don't know how many people have our mamo cookie installed, so I don't know how many people will be affected by the name change.
Verified FIXED -- this was working fine for dark launch, after oremj opened up the firewall, to fix the HTTP 500 errors.
Status: RESOLVED → VERIFIED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.