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: Adding documentation for the redirections Created April 10, 2017, 5:25 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
8 ### http://hub.eyeo.com/issues/444 for ZTE redirects
9 ### http://hub.eyeo.com/issues/496 for bento.de redirects
10 set $use_alternative_resource_flags 0;
11
12 if ($arg_addonName ~ ^([Mm]axthon)$)
13 {
14 set $use_alternative_resource_flags "BROWSER";
15 }
16
17 if ($arg_addonName ~ ^(adblockplusie)$)
18 {
19 set $use_alternative_resource_flags "IE";
20 }
21
22 if ($arg_application ~ ^(yowser|adblockbrowser)$)
23 {
24 set $use_alternative_resource_flags "BROWSER";
25 }
26
27 if ($arg_addonName = "libadblockplus-android")
28 {
29 set $use_alternative_resource_flags "ZTE";
30 }
31
32 if ($geoip_country_code = "DE")
33 {
34 set $use_alternative_resource_flags "${use_alternative_resource_flags}+LOCATIO N";
35 }
36
37 if ($use_alternative_resource_flags = "BROWSER+LOCATION")
38 {
39 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 redirect;
40 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 redirect;
41 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 redirect;
42 }
43
44 if ($use_alternative_resource_flags = "IE+LOCATION")
45 {
46 rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 break;
47 rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist _noelemhide.$1 break;
48 rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 break;
49 }
50
51 if ($use_alternative_resource_flags = "ZTE")
52 {
53 rewrite ^/exceptionrules\.(.+) /exceptionrules-minimal.$1 break;
54 }
55
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