From 99dca8df64f32f4683dbce36b2cc1d0e3507235d Mon Sep 17 00:00:00 2001 From: gahusb Date: Tue, 26 May 2026 22:24:10 +0900 Subject: [PATCH] =?UTF-8?q?fix(nginx):=20/api/image/=20public=20gateway=20?= =?UTF-8?q?+=20/media/image/=20=EC=A0=95=EC=A0=81=20=EC=84=9C=EB=B9=99=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VideoStudio T5에서 누락된 image-lab의 외부 진입점. /api/internal/image/ (worker webhook 차단)만 있고 public /api/image/ 라우팅이 빠져 있어 catch-all /api/로 빠지면서 외부 호출이 잘못된 lab으로 가서 404. video-lab 패턴(line 83)을 그대로 따라 image-lab gateway + image-render 결과 SMB 파일 정적 서빙 두 블록 추가. memory: reference_nas_url_routing.md — 신규 lab 추가 시 nginx 7번째 등재 위치 영구 기록 Co-Authored-By: Claude Opus 4.7 (1M context) --- nginx/default.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/nginx/default.conf b/nginx/default.conf index 9715f2d..9be82cf 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -47,6 +47,16 @@ server { autoindex off; } + # image-render 결과 정적 서빙 (Video Studio) + location ^~ /media/image/ { + alias /data/image/; + + expires 1d; + add_header Cache-Control "public, max-age=86400" always; + + autoindex off; + } + # music videos — Nginx가 직접 비디오 파일 서빙 location ^~ /media/insta/ { alias /data/insta_cards/; @@ -94,6 +104,21 @@ server { proxy_connect_timeout 10s; } + # image-lab — 이미지 생성 gateway (Video Studio) + location /api/image/ { + resolver 127.0.0.11 valid=10s; + set $image_backend image-lab:8000; + + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://$image_backend$request_uri; + + proxy_read_timeout 120s; + proxy_connect_timeout 10s; + } + # realestate API location /api/realestate/ { proxy_http_version 1.1;