fixed nginx config so attachments can be downloaded

This commit is contained in:
Chris 2023-11-12 15:12:35 +00:00
parent f20687c7f9
commit 4b090d998f

View file

@ -2,7 +2,7 @@ server {
listen 80 default_server;
set $base /var/www/opentrashmail;
root /var/www/opentrashmail/web/;
root $base/web/;
index index.php;
@ -36,14 +36,6 @@ server {
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
}
#general
# assets, media
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires 7d;
access_log off;
}
# security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
@ -52,13 +44,6 @@ server {
add_header Content-Security-Policy "default-src * data: 'unsafe-eval' 'unsafe-inline'" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
# svg, fonts
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
add_header Access-Control-Allow-Origin "*";
expires 7d;
access_log off;
}
# gzip
gzip on;
gzip_vary on;