feat: 지역 검색 페이지에 오늘 날씨·각을 서버가 채워 준다 (nginx → /v1/seo/today, 실패하면 정적 HTML)

This commit is contained in:
minaChoi committed 2026-10-14 09:32:23 +09:00
1 parent 2ca060b626
commit a68268234d
8 files changed
+183 -1

No files matched your search

+17
View File
@@ -31,6 +31,23 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}
# 지역 검색 페이지: 백엔드가 정적 HTML(today/…/….html)에 오늘 날씨를 채워 준다. 백엔드가 안 되면 정적 HTML 그대로
location ~ ^/today/[a-z]+/[a-z]+$ {
resolver 127.0.0.11 valid=10s ipv6=off;
set $api http://backend:9800;
proxy_pass $api/v1/seo$uri;
proxy_set_header Host $host;
proxy_connect_timeout 3s;
proxy_read_timeout 20s;
proxy_intercept_errors on;
error_page 404 500 502 503 504 = @static;
}
location @static {
add_header Cache-Control "no-cache";
try_files $uri.html /index.html;
}
# SPA: /gak 처럼 빌드 때 만든 페이지별 HTML(gak.html)이 있으면 그것을, 없으면 index.html. 폴더는 안 찾는다 (/season 이 이미지 폴더 public/season 과 겹쳐 403)
location / {
add_header Cache-Control "no-cache";