LEFT | RIGHT |
1 # XSS and clickjacking prevention headers | 1 # XSS and clickjacking prevention headers |
2 | 2 |
3 set $csp_frame ""; | 3 set $csp_frame ""; |
4 if ($uri ~ ^/(:?\w\w(_\w\w)?/)?(?:index|firefox|chrome|opera|android|internet-ex
plorer|safari|yandex-browser|maxthon)?$|^/blog/) | 4 if ($uri ~ ^/(:?\w\w(_\w\w)?/)?(?:index|firefox|chrome|opera|android|internet-ex
plorer|safari|yandex-browser|maxthon)?$|^/blog/) |
5 { | 5 { |
6 set $csp_frame "; frame-src www.youtube-nocookie.com;"; | 6 set $csp_frame "; frame-src www.youtube-nocookie.com;"; |
7 } | 7 } |
8 add_header Content-Security-Policy "default-src 'self'; img-src * data:; style-s
rc 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' $csp_
frame"; | 8 add_header Content-Security-Policy "default-src 'self'; img-src * data:; style-s
rc 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' $csp_
frame"; |
9 add_header X-Frame-Options "sameorigin"; | 9 add_header X-Frame-Options "sameorigin"; |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if ($arg_link = "adblock_plus_safari_ios_store") | 175 if ($arg_link = "adblock_plus_safari_ios_store") |
176 { | 176 { |
177 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire
ct; | 177 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire
ct; |
178 } | 178 } |
179 if ($arg_link = "adblock_plus_sbrowser_store") | 179 if ($arg_link = "adblock_plus_sbrowser_store") |
180 { | 180 { |
181 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl
ockplussbrowser? redirect; | 181 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl
ockplussbrowser? redirect; |
182 } | 182 } |
183 if ($arg_link = "releases") | 183 if ($arg_link = "releases") |
184 { | 184 { |
185 rewrite ^ https://adblockplus.org/releases? redirect; | 185 rewrite ^ /releases? redirect; |
186 } | 186 } |
187 if ($arg_link = "social_facebook") | 187 if ($arg_link = "social_facebook") |
188 { | 188 { |
189 rewrite ^ https://www.facebook.com/adblockplus? redirect; | 189 rewrite ^ https://www.facebook.com/adblockplus? redirect; |
190 } | 190 } |
191 if ($arg_link = "social_gplus") | 191 if ($arg_link = "social_gplus") |
192 { | 192 { |
193 rewrite ^ https://www.google.com/+AdblockPlus? redirect; | 193 rewrite ^ https://www.google.com/+AdblockPlus? redirect; |
194 } | 194 } |
195 if ($arg_link = "social_renren") | 195 if ($arg_link = "social_renren") |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 location /403.html | 345 location /403.html |
346 { | 346 { |
347 try_files $uri @proxied; | 347 try_files $uri @proxied; |
348 } | 348 } |
349 location @proxied | 349 location @proxied |
350 { | 350 { |
351 proxy_pass https://server16.adblockplus.org; | 351 proxy_pass https://server16.adblockplus.org; |
352 proxy_set_header Host adblockplus.org; | 352 proxy_set_header Host adblockplus.org; |
353 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 353 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
354 } | 354 } |
LEFT | RIGHT |