Fix poster 404: add ^~ to /storage/ locations to override static asset regex

Nginx was serving /storage/.../*.jpg from the local filesystem instead of
proxying to MinIO because the static asset regex location (~* \.(jpg|...)$)
takes priority over plain prefix locations. Adding ^~ ensures the /storage/
and /storage-private/ prefix locations always win over regex matches.

Same root cause as the earlier 405 on thumbnail uploads.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dorian
2026-02-13 21:18:11 +00:00
parent 7f78ac9ba6
commit 5244fdef50
2 changed files with 5 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
CACHEBUST: "11" CACHEBUST: "13"
VITE_USE_MOCK_DATA: "false" VITE_USE_MOCK_DATA: "false"
VITE_CONTENT_ORIGIN: ${FRONTEND_URL} VITE_CONTENT_ORIGIN: ${FRONTEND_URL}
VITE_INDEEHUB_API_URL: /api VITE_INDEEHUB_API_URL: /api

View File

@@ -76,7 +76,9 @@ server {
# ── MinIO storage proxy (public bucket) ──────────────────── # ── MinIO storage proxy (public bucket) ────────────────────
# Serves poster images, HLS segments, etc. with caching # Serves poster images, HLS segments, etc. with caching
location /storage/ { # ^~ ensures this prefix takes priority over the static-asset
# regex that would otherwise intercept .jpg/.png requests.
location ^~ /storage/ {
resolver 127.0.0.11 valid=30s ipv6=off; resolver 127.0.0.11 valid=30s ipv6=off;
set $minio_upstream http://minio:9000; set $minio_upstream http://minio:9000;
@@ -94,7 +96,7 @@ server {
} }
# ── MinIO storage proxy (private bucket -- for HLS key delivery) ─ # ── MinIO storage proxy (private bucket -- for HLS key delivery) ─
location /storage-private/ { location ^~ /storage-private/ {
resolver 127.0.0.11 valid=30s ipv6=off; resolver 127.0.0.11 valid=30s ipv6=off;
set $minio_upstream http://minio:9000; set $minio_upstream http://minio:9000;