| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 set $adblock_browser_android_store $adblock_browser_android_download; | 108 set $adblock_browser_android_store $adblock_browser_android_download; |
| 109 } | 109 } |
| 110 | 110 |
| 111 if ($arg_link = "reporter_connect_issue") | 111 if ($arg_link = "reporter_connect_issue") |
| 112 { | 112 { |
| 113 rewrite ^ /forum/? redirect; | 113 rewrite ^ /forum/? redirect; |
| 114 } | 114 } |
| 115 if ($arg_link = "reporter_other_link") | 115 if ($arg_link = "reporter_other_link") |
| 116 { | 116 { |
| 117 rewrite ^ /forum/? redirect; | 117 rewrite ^ /forum/? redirect; |
| 118 } |
| 119 if ($arg_link = "firefox_support") |
| 120 { |
| 121 rewrite ^ /forum/viewforum.php?f=1? redirect; |
| 118 } | 122 } |
| 119 if ($arg_link = "chrome_support") | 123 if ($arg_link = "chrome_support") |
| 120 { | 124 { |
| 121 rewrite ^ /forum/viewforum.php?f=10? redirect; | 125 rewrite ^ /forum/viewforum.php?f=10? redirect; |
| 122 } | 126 } |
| 123 if ($arg_link = "opera_support") | 127 if ($arg_link = "opera_support") |
| 124 { | 128 { |
| 125 rewrite ^ /forum/viewforum.php?f=14? redirect; | 129 rewrite ^ /forum/viewforum.php?f=14? redirect; |
| 126 } | 130 } |
| 127 if ($arg_link = "safari_support") | 131 if ($arg_link = "safari_support") |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 location /403.html | 429 location /403.html |
| 426 { | 430 { |
| 427 try_files $uri @proxied; | 431 try_files $uri @proxied; |
| 428 } | 432 } |
| 429 location @proxied | 433 location @proxied |
| 430 { | 434 { |
| 431 proxy_pass https://server16.adblockplus.org; | 435 proxy_pass https://server16.adblockplus.org; |
| 432 proxy_set_header Host adblockplus.org; | 436 proxy_set_header Host adblockplus.org; |
| 433 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 437 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 434 } | 438 } |
| LEFT | RIGHT |