From 33da504a8125e8c0c593f9231ffde8281f0e8c09 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:58:39 +0100 Subject: [PATCH] fix nginx one more time --- conf/nginx.conf | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1ef4c7b..15ff97a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,37 +7,10 @@ client_max_body_size 100M; charset utf-8; - # compression settings - gzip on; - gzip_comp_level 5; - gzip_min_length 256; - gzip_proxied any; - gzip_vary on; - gzip_types - application/javascript - application/vnd.geo+json - application/vnd.ms-fontobject - application/x-font-ttf - application/x-web-app-manifest+json - font/opentype - image/bmp - image/svg+xml - image/x-icon - text/cache-manifest - text/css - text/plain - text/vcard - text/vnd.rim.location.xloc - text/vtt - text/x-component - text/x-cross-domain-policy; - # end of compression settings - # headers more_set_headers Content-Security-Policy "default-src 'self'; connect-src https: wss: http: ws: 'self' 'unsafe-eval'; script-src 'self' 'wasm-unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; media-src https: http: 'self' data:; object-src 'none'"; more_set_headers Referrer-Policy "strict-origin-when-cross-origin"; more_set_headers X-Frame-Options "SAMEORIGIN" always; - more_set_headers Service-Worker-Allowed "/"; location /api/ { include /etc/nginx/conf.d/$domain.d/funkwhale_proxy.conf; @@ -74,7 +47,7 @@ try_files $uri $uri/ /index.html; } - location ~ "/(front/)?embed.html" { + location ~ "/(front/)?embed.html/" { alias __INSTALL_DIR__/front/dist/;embed.html; more_set_headers Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:"; more_set_headers Referrer-Policy "strict-origin-when-cross-origin"; @@ -121,7 +94,7 @@ # has been checked on API side. # Comment the "NON-S3" commented lines and uncomment "S3" commented lines # if you're storing media files in a S3 bucket. - location ~ /_protected/media/(.+) { + location ~ /_protected/media/(.+)/ { internal; alias __DATA_DIR__/data/media/$1; # NON-S3 # Needed to ensure DSub auth isn't forwarded to S3/Minio, see #932.