Skip to content

fix: Swagger UI가 petstore 데모 스펙으로 폴백되는 nginx 프록시 누락 수정 #246

Description

@sjungwon03

배경

#244(PR #245)에서 nginx에 Swagger 프록시를 추가했지만, /v3/api-docs를 정확히 일치(location =)로만 매칭해서 swagger-ui가 실제 스펙 위치를 알아내려고 추가로 요청하는 /v3/api-docs/swagger-config가 매칭되지 않고 SPA fallback(index.html)으로 떨어졌다. 그 결과 swagger-ui가 설정을 정상적으로 못 받아 기본 데모 스펙(https://petstore.swagger.io/v2/swagger.json)으로 폴백되는 문제가 배포 도메인에서 발생했다.

작업 범위

  • nginx.conflocation = /v3/api-docs를 prefix 매칭(location /v3/api-docs)으로 변경해 /v3/api-docs/swagger-config 등 하위 요청도 backend로 프록시되게 한다.

검증

  • docker compose config
  • docker compose up -d --build backend frontend 후 컨테이너 내부에서 /v3/api-docs, /v3/api-docs/swagger-config, /swagger-ui/index.html 모두 정상 프록시되는지 확인
  • Swagger UI가 실제 YouthPick API 스펙을 보여주는지 확인 (petstore 아님)

Metadata

Metadata

Assignees

Labels

fix오류 수정

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions