OLD | NEW |
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 |
OLD | NEW |