Left: | ||
Right: |
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
210 } | 210 } |
211 location /403.html | 211 location /403.html |
212 { | 212 { |
213 try_files $uri @proxied; | 213 try_files $uri @proxied; |
214 } | 214 } |
215 location @proxied | 215 location @proxied |
216 { | 216 { |
217 proxy_pass https://server_16.adblockplus.org; | 217 proxy_pass https://server_16.adblockplus.org; |
218 proxy_set_header Host adblockplus.org; | 218 proxy_set_header Host adblockplus.org; |
219 proxy_redirect https://adblockplus.org/ https://$host/; | 219 proxy_redirect https://adblockplus.org/ https://$host/; |
220 sub_filter_once off; | |
221 sub_filter https://adblockplus.org/ https://$host/; | |
mathias
2015/04/16 12:44:14
I understand what you are doing here - but why?
mathias
2015/04/16 13:50:20
Never mind, I've seen it now.
| |
220 } | 222 } |
OLD | NEW |