| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 { | 171 { |
| 172 set $lang "en"; | 172 set $lang "en"; |
| 173 } | 173 } |
| 174 if ($link = "share") | 174 if ($link = "share") |
| 175 { | 175 { |
| 176 rewrite ^ https://share.adblockplus.org/$lang/? redirect; | 176 rewrite ^ https://share.adblockplus.org/$lang/? redirect; |
| 177 } | 177 } |
| 178 rewrite ^ /$lang/$link$anchor? redirect; | 178 rewrite ^ /$lang/$link$anchor? redirect; |
| 179 } | 179 } |
| 180 | 180 |
| 181 location /devbuilds | |
| 182 { | |
| 183 rewrite ^(.*) https://downloads.adblockplus.org$1; | |
| 184 } | |
| 185 | |
| 186 # Locations still served by the legacy server | 181 # Locations still served by the legacy server |
| 187 | 182 |
| 188 location ~ ^(/blog|/releases|/development-builds|/atom|/rss|/category|/section|/
author|/file_download|/textpattern|/default-static|/_override-static)($|/) | 183 location ~ ^(/blog|/releases|/development-builds|/atom|/rss|/category|/section|/
author|/file_download|/textpattern|/default-static|/_override-static)($|/) |
| 189 { | 184 { |
| 190 try_files $uri @proxied; | 185 try_files $uri @proxied; |
| 191 } | 186 } |
| 187 location /devbuilds |
| 188 { |
| 189 try_files $uri @proxied; |
| 190 } |
| 191 location /submitEmail |
| 192 { |
| 193 try_files $uri @proxied; |
| 194 } |
| 192 location /forum | 195 location /forum |
| 193 { | 196 { |
| 194 try_files $uri @proxied; | 197 try_files $uri @proxied; |
| 195 } | 198 } |
| 196 location /subscriptions.xml | 199 location /subscriptions.xml |
| 197 { | 200 { |
| 198 try_files $uri @proxied; | 201 try_files $uri @proxied; |
| 199 } | 202 } |
| 200 location /subscriptions2.xml | 203 location /subscriptions2.xml |
| 201 { | 204 { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 215 } | 218 } |
| 216 location @proxied | 219 location @proxied |
| 217 { | 220 { |
| 218 proxy_pass https://server_16.adblockplus.org; | 221 proxy_pass https://server_16.adblockplus.org; |
| 219 proxy_set_header Host adblockplus.org; | 222 proxy_set_header Host adblockplus.org; |
| 220 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 223 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 221 proxy_redirect https://adblockplus.org/ https://$host/; | 224 proxy_redirect https://adblockplus.org/ https://$host/; |
| 222 sub_filter_once off; | 225 sub_filter_once off; |
| 223 sub_filter https://adblockplus.org/ https://$host/; | 226 sub_filter https://adblockplus.org/ https://$host/; |
| 224 } | 227 } |
| OLD | NEW |