From 3c5ac26c10d1e72fd92efe13d8f87a937503f8d4 Mon Sep 17 00:00:00 2001 From: sjungwon03 Date: Fri, 24 Jul 2026 16:24:52 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20swagger-config=20=ED=94=84=EB=A1=9D?= =?UTF-8?q?=EC=8B=9C=20=EB=88=84=EB=9D=BD=EC=9C=BC=EB=A1=9C=20Swagger=20UI?= =?UTF-8?q?=EA=B0=80=20petstore=EB=A1=9C=20=ED=8F=B4=EB=B0=B1=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /v3/api-docs를 정확히 일치(location =)로 매칭해 swagger-ui가 실제 스펙 위치를 알아내려고 요청하는 /v3/api-docs/swagger-config 가 SPA fallback(index.html)으로 떨어졌다. prefix 매칭으로 바꿔 하위 경로도 backend로 프록시되게 한다. Closes #246 --- nginx.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index c4dc678..3b8ef23 100644 --- a/nginx.conf +++ b/nginx.conf @@ -45,7 +45,10 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - location = /v3/api-docs { + # 정확히 일치(=)로 매칭하면 swagger-ui가 실제 스펙 위치를 알아내려고 추가로 요청하는 + # /v3/api-docs/swagger-config 가 이 location을 안 타고 SPA fallback으로 떨어져 + # swagger-ui가 기본 데모 스펙(petstore)으로 폴백된다. prefix로 하위 경로까지 잡는다. + location /v3/api-docs { proxy_pass http://backend:8080/v3/api-docs; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;