swagger
-
Nginx 배포 시 Spring Swagger 안나오는 버그 해결클라우드 2025. 5. 27. 22:32
문제 상황원래 SpringBoot의 resoureces/static 파일 아래에 React build 결과 나온 파일을 넣어 통합 배포를 하고 있었습니다.이때는 Swagger가 잘 나와서 문제가 없었는데 nginx를 통한 통합 배포를 하며 오류가 발생했습니다.현재 상황은Nginx에 프론트 빌드 파일을 올려 배포하고 nginx의 proxy_pass 설정을 통해 같은 인스턴스의 SpringBoot로 /api 요청이 들어오면 http://localhost:8080/api 로 보내주는 설정을 해두고 있었습니다.location /api/ { proxy_pass ; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-..