diff --git a/nginx/site.conf.example b/nginx/site.conf.example index ab5d9f3..b1d959a 100644 --- a/nginx/site.conf.example +++ b/nginx/site.conf.example @@ -43,14 +43,20 @@ server { application/javascript application/json application/xml image/svg+xml; - # 승인 nonce·OAuth code가 액세스 로그나 Referer로 새지 않도록 별도로 서빙한다. + # 승인 nonce 가 액세스 로그·Referer·검색 색인으로 새지 않게 이 자리만 따로 준다. + # + # ★ `try_files` 를 쓰면 헤더가 사라진다. try_files 의 폴백은 **내부 리다이렉트**라 + # 요청이 이 블록을 떠나 `location /` 로 다시 들어가고, 거기서 나가는 응답에는 + # 아래 add_header 가 하나도 붙지 않는다(실측 2026-09-14: 200 은 뜨는데 헤더만 없다). + # `rewrite ... break` 는 같은 블록 안에 머문다 — 그래서 이 모양이어야 한다. + # ★ 승인 링크는 SPA 한 장이라 파일을 찾아 줄 일이 없다. 곧바로 셸을 준다. location ^~ /approve/ { root /srv/app; - try_files $uri /index.html; access_log off; add_header Referrer-Policy "no-referrer" always; add_header Cache-Control "no-store" always; add_header X-Robots-Tag "noindex, nofollow" always; + rewrite ^ /__spa-fallback.html break; } # ── 발행 사이트 ────────────────────────────────────────────