Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: puppet/modules/adblockplusorg/files/adblockplus.org

Issue 5046426828537856: Issue 1485 - Created Maxthon landing page (Infrastructure) (Closed)
Patch Set: Added missing "/" in user agent regex Created Oct. 24, 2014, 2:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: puppet/modules/adblockplusorg/files/adblockplus.org
===================================================================
--- a/puppet/modules/adblockplusorg/files/adblockplus.org
+++ b/puppet/modules/adblockplusorg/files/adblockplus.org
@@ -35,6 +35,9 @@
if ($http_user_agent ~ \bAndroid\s.*\bAppleWebKit/\d+) {
set $user_agent "android";
}
+ if ($http_user_agent ~ \bMaxthon/\d+) {
+ set $user_agent "maxthon";
+ }
set $platform "firefox";
if ($user_agent) {
@@ -57,7 +60,7 @@
}
set $static_uri $uri;
- if ($uri ~ ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android|internet-explorer)/?$) {
+ if ($uri ~ ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android|internet-explorer|maxthon)/?$) {
set $static_uri "/$1/";
set $platform $3;
}
@@ -73,7 +76,7 @@
rewrite ^ /static$static_uri?platform=$platform&user_agent=$user_agent last;
}
- rewrite ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android|internet-explorer)/?$ /index.php?p=$1&platform=$3&user_agent=$user_agent last;
+ rewrite ^/(\w\w(_\w\w)?)/(firefox|chrome|opera|android|internet-explorer|maxthon)/?$ /index.php?p=$1&platform=$3&user_agent=$user_agent last;
rewrite ^/(.*) /index.php?p=$1 last;
}

Powered by Google App Engine
This is Rietveld