mirror of
https://github.com/frappe/bench.git
synced 2025-01-23 23:18:24 +00:00
fix(security): Force download html, svg and xml files
Same as https://github.com/frappe/frappe/pull/7074 for public files in production environment
This commit is contained in:
parent
9dceb61028
commit
893cb884ee
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user