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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 rewrite ^ /forum/viewforum.php?f=10? redirect; | 114 rewrite ^ /forum/viewforum.php?f=10? redirect; |
115 } | 115 } |
116 if ($arg_link = "opera_support") | 116 if ($arg_link = "opera_support") |
117 { | 117 { |
118 rewrite ^ /forum/viewforum.php?f=14? redirect; | 118 rewrite ^ /forum/viewforum.php?f=14? redirect; |
119 } | 119 } |
120 if ($arg_link = "safari_support") | 120 if ($arg_link = "safari_support") |
121 { | 121 { |
122 rewrite ^ /forum/viewforum.php?f=18? redirect; | 122 rewrite ^ /forum/viewforum.php?f=18? redirect; |
123 } | 123 } |
124 if ($arg_link = "edge_support") | |
125 { | |
126 rewrite ^ /forum/viewforum.php?f=27? redirect; | |
127 } | |
128 if ($arg_link = "knownIssuesChrome_filterstorage") | 124 if ($arg_link = "knownIssuesChrome_filterstorage") |
129 { | 125 { |
130 rewrite ^ /forum/viewtopic.php?t=23597? redirect; | 126 rewrite ^ /forum/viewtopic.php?t=23597? redirect; |
131 } | 127 } |
132 if ($arg_link = "adblock_browser_android_beta_community") | 128 if ($arg_link = "adblock_browser_android_beta_community") |
133 { | 129 { |
134 rewrite ^ https://plus.google.com/communities/104936844759781288661? redirec
t; | 130 rewrite ^ https://plus.google.com/communities/104936844759781288661? redirec
t; |
135 } | 131 } |
136 if ($arg_link ~ "^adblock_browser_promotion_\d$") | 132 if ($arg_link ~ "^adblock_browser_promotion_\d$") |
137 { | 133 { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 location /403.html | 307 location /403.html |
312 { | 308 { |
313 try_files $uri @proxied; | 309 try_files $uri @proxied; |
314 } | 310 } |
315 location @proxied | 311 location @proxied |
316 { | 312 { |
317 proxy_pass https://server16.adblockplus.org; | 313 proxy_pass https://server16.adblockplus.org; |
318 proxy_set_header Host adblockplus.org; | 314 proxy_set_header Host adblockplus.org; |
319 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 315 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
320 } | 316 } |
OLD | NEW |