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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 try_files $uri @proxied; | 292 try_files $uri @proxied; |
293 } | 293 } |
294 location /subscriptions2.xml | 294 location /subscriptions2.xml |
295 { | 295 { |
296 try_files $uri @proxied; | 296 try_files $uri @proxied; |
297 } | 297 } |
298 location /subscriptionStatus | 298 location /subscriptionStatus |
299 { | 299 { |
300 try_files $uri @proxied; | 300 try_files $uri @proxied; |
301 } | 301 } |
302 location /jsdoc | 302 location ~ ^/(docs|jsdoc)($|/) |
303 { | 303 { |
304 try_files $uri @proxied; | 304 root /var/www/docs; |
305 } | |
306 location /docs | |
307 { | |
308 try_files $uri @proxied; | |
309 } | 305 } |
310 location /403.html | 306 location /403.html |
311 { | 307 { |
312 try_files $uri @proxied; | 308 try_files $uri @proxied; |
313 } | 309 } |
314 location @proxied | 310 location @proxied |
315 { | 311 { |
316 proxy_pass https://server16.adblockplus.org; | 312 proxy_pass https://server16.adblockplus.org; |
317 proxy_set_header Host adblockplus.org; | 313 proxy_set_header Host adblockplus.org; |
318 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 314 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
319 } | 315 } |
OLD | NEW |