2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-14 09:14:04 +00:00

Merge pull request #841 from frappe/fix-svg-xss

fix(security): Force download html, svg and xml files
This commit is contained in:
sahil28297 2019-09-05 15:39:40 +05:30 committed by GitHub
commit f6d1a9fa5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,12 @@ server {
} }
location / { location / {
location ~ ^/files/.*.(htm|html|svg|xml) {
add_header Content-disposition "attachment";
try_files /{{ site_name }}/public/$uri @webserver;
}
try_files /{{ site_name }}/public/$uri @webserver; try_files /{{ site_name }}/public/$uri @webserver;
} }