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

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

Issue 29408755: Redirect for more granular control of lists (Closed)
Patch Set: Created April 10, 2017, 5:16 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
7 set $use_alternative_resource_flags 0;
mathias 2017/04/10 17:20:00 We should link to the Hub tickets where appropriat
8
9 if ($arg_addonName ~ ^([Mm]axthon)$)
10 {
11 set $use_alternative_resource_flags "BROWSER";
12 }
13
14 if ($arg_addonName ~ ^(adblockplusie)$)
15 {
16 set $use_alternative_resource_flags "IE";
17 }
18
19 if ($arg_application ~ ^(yowser|adblockbrowser)$)
20 {
21 set $use_alternative_resource_flags "BROWSER";
22 }
23
24 if ($arg_addonName = "libadblockplus-android")
25 {
26 set $use_alternative_resource_flags "ZTE";
27 }
28
29 if ($geoip_country_code = "DE")
30 {
31 set $use_alternative_resource_flags "${use_alternative_resource_flags}+LOCATIO N";
32 }
33
34 if ($use_alternative_resource_flags = "BROWSER+LOCATION")
35 {
36 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 redirect;
37 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 redirect;
38 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 redirect;
39 }
40
41 if ($use_alternative_resource_flags = "IE+LOCATION")
42 {
43 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 break;
44 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 break;
45 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 break;
46 }
47
48 if ($use_alternative_resource_flags = "ZTE")
49 {
50 rewrite ^/exceptionrules\.(.+) /exceptionrules-minimal.$1 break;
51 }
52
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