Skip to content

A self-hosted media server and file management system

fix: nginx invalid referrer setup

aminnausinf974c5cd6f09
diff --git a/docker/.env.docker b/docker/.env.docker
index f803cda7..dbc8977b 100644
--- a/docker/.env.docker
+++ b/docker/.env.docker
@@ -58,11 +58,13 @@ PLAUSIBLE_API_TOKEN=
# ================================
# Cloudflare Token (unused)
# ================================
+
CF=
# ================================
# Email Setup
# ================================
+
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
diff --git a/docker/etc/nginx/conf.d/default.conf b/docker/etc/nginx/conf.d/default.conf
index 9491a675..c3851d50 100644
--- a/docker/etc/nginx/conf.d/default.conf
+++ b/docker/etc/nginx/conf.d/default.conf
@@ -51,8 +51,13 @@ server {
deny all;
}
+ location ~* \.(?:css|js|woff2?|ttf|eot|otf|ico|jpe?g|png|gif|webp|svg)$ {
+ add_header Cache-Control "public, max-age=604800, must-revalidate";
+ try_files $uri =404;
+ }
+
location /storage/ {
- location ~ ^/storage/(thumbnails|posters|previews)/ {
+ location ~* /\.storage/(thumbnails|posters|previews)/ {
add_header Cache-Control "public, max-age=604800, must-revalidate";
try_files $uri =404;
allow all;
@@ -63,9 +68,4 @@ server {
return 403;
}
}
-
- location ~* \.(?:css|js|woff2?|ttf|eot|otf|ico|jpe?g|png|gif|webp|svg)$ {
- add_header Cache-Control "public, max-age=604800, must-revalidate";
- try_files $uri =404;
- }
}