| OLD | NEW |
| 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)?$) | 4 if ($uri ~ ^/(:?\w\w(_\w\w)?/)?(?:index|firefox|chrome|opera|android|internet-ex
plorer|safari|yandex-browser|maxthon)?$) |
| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 rewrite ^ $adblock_browser_android_download? redirect; | 154 rewrite ^ $adblock_browser_android_download? redirect; |
| 155 } | 155 } |
| 156 if ($arg_link = "adblock_plus_safari_ios_support") | 156 if ($arg_link = "adblock_plus_safari_ios_support") |
| 157 { | 157 { |
| 158 rewrite ^ /forum/viewforum.php?f=26? redirect; | 158 rewrite ^ /forum/viewforum.php?f=26? redirect; |
| 159 } | 159 } |
| 160 if ($arg_link = "adblock_plus_safari_ios_store") | 160 if ($arg_link = "adblock_plus_safari_ios_store") |
| 161 { | 161 { |
| 162 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire
ct; | 162 rewrite ^ https://itunes.apple.com/app/adblock-plus-abp/id1028871868? redire
ct; |
| 163 } | 163 } |
| 164 if ($arg_link = "adblock_plus_sbrowser_store") |
| 165 { |
| 166 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.adbl
ockplussbrowser? redirect; |
| 167 } |
| 164 | 168 |
| 165 set $lang "en"; | 169 set $lang "en"; |
| 166 set $link ""; | 170 set $link ""; |
| 167 set $anchor ""; | 171 set $anchor ""; |
| 168 | 172 |
| 169 if ($arg_link ~ "^share-") | 173 if ($arg_link ~ "^share-") |
| 170 { | 174 { |
| 171 set $link "share"; | 175 set $link "share"; |
| 172 set $anchor "?a=minimal"; | 176 set $anchor "?a=minimal"; |
| 173 } | 177 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 location /403.html | 310 location /403.html |
| 307 { | 311 { |
| 308 try_files $uri @proxied; | 312 try_files $uri @proxied; |
| 309 } | 313 } |
| 310 location @proxied | 314 location @proxied |
| 311 { | 315 { |
| 312 proxy_pass https://server16.adblockplus.org; | 316 proxy_pass https://server16.adblockplus.org; |
| 313 proxy_set_header Host adblockplus.org; | 317 proxy_set_header Host adblockplus.org; |
| 314 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 318 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 315 } | 319 } |
| OLD | NEW |