mastodon: update nginx config with csp

This commit is contained in:
Saibotk 2023-07-06 17:48:25 +02:00
parent a6125ae80a
commit 1f7512c43a
Signed by: saibotk
GPG key ID: 67585F0065E261D5

View file

@ -36,11 +36,18 @@ server {
try_files $uri @proxy;
}
location ~ ^/(assets|avatars|emoji|headers|packs|shortcuts|sounds|system)/ {
location ~ ^/(assets|avatars|emoji|headers|packs|shortcuts|sounds)/ {
add_header Cache-Control "public, max-age=2419200, must-revalidate";
try_files $uri @proxy;
}
location ~ ^/system/ {
add_header Cache-Control "public, max-age=2419200, immutable";
add_header X-Content-Type-Options nosniff;
add_header Content-Security-Policy "default-src 'none'; form-action 'none'";
try_files $uri @proxy;
}
location /sw.js {
add_header Cache-Control "public, max-age=604800, must-revalidate";
try_files $uri @proxy;