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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.brow
ser? redirect; | 136 rewrite ^ https://play.google.com/store/apps/details?id=org.adblockplus.brow
ser? redirect; |
137 } | 137 } |
138 if ($arg_link = "adblock_browser_ios_store") | 138 if ($arg_link = "adblock_browser_ios_store") |
139 { | 139 { |
140 rewrite ^ https://itunes.apple.com/us/app/adblock-browser/id1015653330?ls=1&
mt=8? redirect; | 140 rewrite ^ https://itunes.apple.com/us/app/adblock-browser/id1015653330?ls=1&
mt=8? redirect; |
141 } | 141 } |
142 if ($arg_link = "adblock_browser_android_download") | 142 if ($arg_link = "adblock_browser_android_download") |
143 { | 143 { |
144 rewrite ^ https://downloads.adblockplus.org/adblockbrowser-1.0.0-arm.apk? re
direct; | 144 rewrite ^ https://downloads.adblockplus.org/adblockbrowser-1.0.0-arm.apk? re
direct; |
145 } | 145 } |
| 146 if ($arg_link = "adblock_plus_safari_ios_support") |
| 147 { |
| 148 rewrite ^ /forum/viewforum.php?f=26? redirect; |
| 149 } |
146 | 150 |
147 set $lang "en"; | 151 set $lang "en"; |
148 set $link ""; | 152 set $link ""; |
149 set $anchor ""; | 153 set $anchor ""; |
150 | 154 |
151 if ($arg_link ~ "^share-") | 155 if ($arg_link ~ "^share-") |
152 { | 156 { |
153 set $link "share"; | 157 set $link "share"; |
154 set $anchor "?a=minimal"; | 158 set $anchor "?a=minimal"; |
155 } | 159 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 location /403.html | 275 location /403.html |
272 { | 276 { |
273 try_files $uri @proxied; | 277 try_files $uri @proxied; |
274 } | 278 } |
275 location @proxied | 279 location @proxied |
276 { | 280 { |
277 proxy_pass https://server16.adblockplus.org; | 281 proxy_pass https://server16.adblockplus.org; |
278 proxy_set_header Host adblockplus.org; | 282 proxy_set_header Host adblockplus.org; |
279 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 283 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
280 } | 284 } |
OLD | NEW |