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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 rewrite ^ /forum/viewforum.php?f=14? redirect; | 89 rewrite ^ /forum/viewforum.php?f=14? redirect; |
90 } | 90 } |
91 if ($arg_link = "safari_support") | 91 if ($arg_link = "safari_support") |
92 { | 92 { |
93 rewrite ^ /forum/viewforum.php?f=18? redirect; | 93 rewrite ^ /forum/viewforum.php?f=18? redirect; |
94 } | 94 } |
95 if ($arg_link = "knownIssuesChrome_filterstorage") | 95 if ($arg_link = "knownIssuesChrome_filterstorage") |
96 { | 96 { |
97 rewrite ^ /forum/viewtopic.php?t=23597? redirect; | 97 rewrite ^ /forum/viewtopic.php?t=23597? redirect; |
98 } | 98 } |
| 99 if ($arg_link = "adblock_browser_android_beta_community") |
| 100 { |
| 101 rewrite ^ https://plus.google.com/u/1/communities/104936844759781288661? red
irect; |
| 102 } |
99 | 103 |
100 set $lang "en"; | 104 set $lang "en"; |
101 set $link ""; | 105 set $link ""; |
102 set $anchor ""; | 106 set $anchor ""; |
103 | 107 |
104 if ($arg_link ~ "^share-") | 108 if ($arg_link ~ "^share-") |
105 { | 109 { |
106 set $link "share"; | 110 set $link "share"; |
107 set $anchor "?a=minimal"; | 111 set $anchor "?a=minimal"; |
108 } | 112 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 226 } |
223 location @proxied | 227 location @proxied |
224 { | 228 { |
225 proxy_pass https://server_16.adblockplus.org; | 229 proxy_pass https://server_16.adblockplus.org; |
226 proxy_set_header Host adblockplus.org; | 230 proxy_set_header Host adblockplus.org; |
227 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 231 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
228 proxy_redirect https://adblockplus.org/ https://$host/; | 232 proxy_redirect https://adblockplus.org/ https://$host/; |
229 sub_filter_once off; | 233 sub_filter_once off; |
230 sub_filter https://adblockplus.org/ https://$host/; | 234 sub_filter https://adblockplus.org/ https://$host/; |
231 } | 235 } |
OLD | NEW |