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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 { | 175 { |
176 set $lang "en"; | 176 set $lang "en"; |
177 } | 177 } |
178 if ($link = "share") | 178 if ($link = "share") |
179 { | 179 { |
180 rewrite ^ https://share.adblockplus.org/$lang/? redirect; | 180 rewrite ^ https://share.adblockplus.org/$lang/? redirect; |
181 } | 181 } |
182 rewrite ^ /$lang/$link$anchor? redirect; | 182 rewrite ^ /$lang/$link$anchor? redirect; |
183 } | 183 } |
184 | 184 |
| 185 location /devbuilds |
| 186 { |
| 187 rewrite ^(.*) https://downloads.adblockplus.org$1; |
| 188 } |
| 189 |
185 # Locations still served by the legacy server | 190 # Locations still served by the legacy server |
186 | 191 |
187 location ~ ^(/blog|/releases|/development-builds|/atom|/rss|/category|/section|/
author|/file_download|/textpattern|/default-static|/_override-static)($|/) | 192 location ~ ^(/blog|/releases|/development-builds|/atom|/rss|/category|/section|/
author|/file_download|/textpattern|/default-static|/_override-static)($|/) |
188 { | 193 { |
189 try_files $uri @proxied; | 194 try_files $uri @proxied; |
190 } | 195 } |
191 location /devbuilds | |
192 { | |
193 try_files $uri @proxied; | |
194 } | |
195 location /submitEmail | 196 location /submitEmail |
196 { | 197 { |
197 try_files $uri @proxied; | 198 try_files $uri @proxied; |
198 } | 199 } |
199 location /verifyEmail | 200 location /verifyEmail |
200 { | 201 { |
201 try_files $uri @proxied; | 202 try_files $uri @proxied; |
202 } | 203 } |
203 location /forum | 204 location /forum |
204 { | 205 { |
(...skipping 21 matching lines...) Expand all Loading... |
226 } | 227 } |
227 location @proxied | 228 location @proxied |
228 { | 229 { |
229 proxy_pass https://server_16.adblockplus.org; | 230 proxy_pass https://server_16.adblockplus.org; |
230 proxy_set_header Host adblockplus.org; | 231 proxy_set_header Host adblockplus.org; |
231 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 232 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
232 proxy_redirect https://adblockplus.org/ https://$host/; | 233 proxy_redirect https://adblockplus.org/ https://$host/; |
233 sub_filter_once off; | 234 sub_filter_once off; |
234 sub_filter https://adblockplus.org/ https://$host/; | 235 sub_filter https://adblockplus.org/ https://$host/; |
235 } | 236 } |
OLD | NEW |