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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 rewrite ^ /forum/viewforum.php?f=18? redirect; | 99 rewrite ^ /forum/viewforum.php?f=18? redirect; |
100 } | 100 } |
101 if ($arg_link = "knownIssuesChrome_filterstorage") | 101 if ($arg_link = "knownIssuesChrome_filterstorage") |
102 { | 102 { |
103 rewrite ^ /forum/viewtopic.php?t=23597? redirect; | 103 rewrite ^ /forum/viewtopic.php?t=23597? redirect; |
104 } | 104 } |
105 if ($arg_link = "adblock_browser_android_beta_community") | 105 if ($arg_link = "adblock_browser_android_beta_community") |
106 { | 106 { |
107 rewrite ^ https://plus.google.com/communities/104936844759781288661? redirec
t; | 107 rewrite ^ https://plus.google.com/communities/104936844759781288661? redirec
t; |
108 } | 108 } |
| 109 if ($arg_link ~ "^adblock_browser_promotion_\d$") |
| 110 { |
| 111 rewrite ^ https://adblockplus.org/adblock-browser redirect; |
| 112 } |
109 | 113 |
110 set $lang "en"; | 114 set $lang "en"; |
111 set $link ""; | 115 set $link ""; |
112 set $anchor ""; | 116 set $anchor ""; |
113 | 117 |
114 if ($arg_link ~ "^share-") | 118 if ($arg_link ~ "^share-") |
115 { | 119 { |
116 set $link "share"; | 120 set $link "share"; |
117 set $anchor "?a=minimal"; | 121 set $anchor "?a=minimal"; |
118 } | 122 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 location /403.html | 238 location /403.html |
235 { | 239 { |
236 try_files $uri @proxied; | 240 try_files $uri @proxied; |
237 } | 241 } |
238 location @proxied | 242 location @proxied |
239 { | 243 { |
240 proxy_pass https://server16.adblockplus.org; | 244 proxy_pass https://server16.adblockplus.org; |
241 proxy_set_header Host adblockplus.org; | 245 proxy_set_header Host adblockplus.org; |
242 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 246 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
243 } | 247 } |
OLD | NEW |