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

Side by Side Diff: modules/filterserver/files/site.conf

Issue 29464623: #1374 - Redirect ZTE users to minimized filter-lists (Closed)
Patch Set: Created June 13, 2017, 1:41 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 root /var/www/easylist; 1 root /var/www/easylist;
2 keepalive_timeout 0; 2 keepalive_timeout 0;
3 charset utf-8; 3 charset utf-8;
4 gzip_static on; 4 gzip_static on;
5 default_type text/plain; 5 default_type text/plain;
6 6
7 # http://hub.eyeo.com/issues/262 7 # http://hub.eyeo.com/issues/262
8 location /filters/easylist-min.txt 8 location /filters/easylist-min.txt
9 { 9 {
10 proxy_cache filters; 10 proxy_cache filters;
(...skipping 29 matching lines...) Expand all
40 if ($arg_addonVersion ~ ^2\.(7|8|9)(\..*)?$) 40 if ($arg_addonVersion ~ ^2\.(7|8|9)(\..*)?$)
41 { 41 {
42 set $use_alternative_resource_flags "${use_alternative_resource_flags}+SUPPORT S_ELEMHIDE"; 42 set $use_alternative_resource_flags "${use_alternative_resource_flags}+SUPPORT S_ELEMHIDE";
43 } 43 }
44 44
45 if ($arg_addonName = "libadblockplus-android") 45 if ($arg_addonName = "libadblockplus-android")
46 { 46 {
47 set $use_alternative_resource_flags "ZTE"; 47 set $use_alternative_resource_flags "ZTE";
48 } 48 }
49 49
50 # http://hub.eyeo.com/issues/1374
51 if ($arg_application = "com.mx.browser")
52 {
53 set $use_alternative_resource_flags "${use_alternative_resource_flags}+MX"
54 }
55
50 if ($geoip_country_code = "DE") 56 if ($geoip_country_code = "DE")
51 { 57 {
52 set $use_alternative_resource_flags "${use_alternative_resource_flags}+LOCATIO N"; 58 set $use_alternative_resource_flags "${use_alternative_resource_flags}+LOCATIO N";
53 } 59 }
54 60
55 if ($use_alternative_resource_flags = "BROWSER+LOCATION") 61 if ($use_alternative_resource_flags = "BROWSER+LOCATION")
56 { 62 {
57 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 redirect; 63 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 redirect;
58 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 redirect; 64 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 redirect;
59 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 redirect; 65 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 redirect;
60 } 66 }
61 67
62 if ($use_alternative_resource_flags = "IE+LOCATION") 68 if ($use_alternative_resource_flags = "IE+LOCATION")
63 { 69 {
64 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 break; 70 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 break;
65 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 break; 71 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 break;
66 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 break; 72 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 break;
67 } 73 }
68 74
69 if ($use_alternative_resource_flags = "ZTE") 75 if ($use_alternative_resource_flags = "ZTE")
70 { 76 {
71 rewrite ^/exceptionrules\.(.+) /exceptionrules-minimal.$1 break; 77 rewrite ^/exceptionrules\.(.+) /exceptionrules-minimal.$1 break;
72 } 78 }
73 79
80 if ($use_alternative_resource_flags = "ZTE+MX")
81 {
82 rewrite ^/exceptionrules\.(.+) /exceptionrules-minimal.$1 break;
83 rewrite ^/easylist\.(.+) /easylist-minimal.$1 break;
84 rewrite ^/easylistchina\.(.+) /easylistchina-minimal.$1 break;
85 rewrite ^/advblock\.(.+) /advblock-minimal.$1 break;
86 rewrite ^/easylistchina+easylist\.(.+) /easylistchina-minimal+easylist-minimal .$1 break;
87 rewrite ^/ruadlist+easylist\.(.+) /ruadlist-minimal+easylist-minimal.$1 break;
88 }
89
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld