Index: modules/filterserver/files/site.conf |
=================================================================== |
--- a/modules/filterserver/files/site.conf |
+++ b/modules/filterserver/files/site.conf |
@@ -3,3 +3,53 @@ |
charset utf-8; |
gzip_static on; |
default_type text/plain; |
+ |
+ |
+### http://hub.eyeo.com/issues/444 for ZTE redirects |
+### http://hub.eyeo.com/issues/496 for bento.de redirects |
+set $use_alternative_resource_flags 0; |
+ |
+if ($arg_addonName ~ ^([Mm]axthon)$) |
+{ |
+ set $use_alternative_resource_flags "BROWSER"; |
+} |
+ |
+if ($arg_addonName ~ ^(adblockplusie)$) |
+{ |
+ set $use_alternative_resource_flags "IE"; |
+} |
+ |
+if ($arg_application ~ ^(yowser|adblockbrowser)$) |
+{ |
+ set $use_alternative_resource_flags "BROWSER"; |
+} |
+ |
+if ($arg_addonName = "libadblockplus-android") |
+{ |
+ set $use_alternative_resource_flags "ZTE"; |
+} |
+ |
+if ($geoip_country_code = "DE") |
+{ |
+ set $use_alternative_resource_flags "${use_alternative_resource_flags}+LOCATION"; |
+} |
+ |
+if ($use_alternative_resource_flags = "BROWSER+LOCATION") |
+{ |
+ rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 redirect; |
+ rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist_noelemhide.$1 redirect; |
+ rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 redirect; |
+} |
+ |
+if ($use_alternative_resource_flags = "IE+LOCATION") |
+{ |
+ rewrite ^/easylist\.(.+) /easylist_noelemhide.$1 break; |
+ rewrite ^/easylistgermany\+easylist\.(.+) /easylistgermany_noelemhide+easylist_noelemhide.$1 break; |
+ rewrite ^/easylistgermany\.(.+) /easylistgermany_noelemhide.$1 break; |
+} |
+ |
+if ($use_alternative_resource_flags = "ZTE") |
+{ |
+ rewrite ^/exceptionrules\.(.+) /exceptionrules-minimal.$1 break; |
+} |
+ |