fix UI CSP for email and disable caching for default pages

This commit is contained in:
florian 2024-03-12 13:43:27 +01:00
parent 8206aceaca
commit 5140a11dd4
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500
3 changed files with 7 additions and 1 deletions

View file

@ -38,6 +38,9 @@ server {
{% if IS_LOADING == "yes" +%}
root /usr/share/bunkerweb/loading;
try_files /index.html =404;
etag off;
add_header Last-Modified "";
server_tokens off;
{% endif %}
# include core and plugins default-server configurations

View file

@ -2,5 +2,8 @@
root /usr/share/bunkerweb/core/misc/files;
location / {
try_files /default.html =404;
etag off;
add_header Last-Modified "";
server_tokens off;
}
{% endif %}

View file

@ -357,7 +357,7 @@ def set_csp_header(response):
response.headers["Content-Security-Policy"] = (
"object-src 'none';"
+ " frame-ancestors 'self';"
+ " default-src 'self' https://www.bunkerweb.io https://assets.bunkerity.com;"
+ " default-src 'self' https://www.bunkerweb.io https://assets.bunkerity.com https://bunkerity.us1.list-manage.com;"
+ f" script-src 'self' 'nonce-{app.config['SCRIPT_NONCE']}';"
+ " style-src 'self' 'unsafe-inline';"
+ " img-src 'self' data: https://assets.bunkerity.com;"