nginx 프론트의 Host 헤더 누락으로 인한 Tomcat 400 수정 - #28
Merged
Conversation
- 이행 배포 실측: proxy_set_header Host 부재 시 nginx 가 upstream 이름(piki_extractor)을 Host 로 전달하고, Tomcat 이 언더스코어 도메인을 400 으로 거절해 프론트 전체가 400 이 됐다 (원복 로직이 새 슬롯을 정리한 상태에서 레거시는 이미 제거된 이행 1회차라 약 10분 다운타임) - 박스에는 동일 수정을 핫픽스로 이미 적용해 복구 완료 - 이 커밋은 repo 정본을 박스와 일치시켜 다음 배포가 conf 를 덮어도 재발하지 않게 한다 - 검증: 같은 슬롯에 Host 정상=200 / Host piki_extractor=400 실측으로 원인 확정, 수정 conf 는 docker nginx -t 통과
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughNginx 루트 프록시 경로가 upstream 이름 대신 클라이언트 요청의 ChangesNginx 프록시 헤더 변경
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Situation
proxy_set_header Host가 없으면 nginx 는 upstream 이름을 Host 헤더로 넘긴다. upstream 이름piki_extractor의 언더스코어를 Tomcat 이 RFC 위반 도메인으로 보고 400 을 뱉었다. 같은 슬롯에 Host 정상 = 200,Host: piki_extractor= 400 으로 확정했다. core 의 conf 는 upstream 이름이team3라 언더스코어가 없어 우연히 무사했던 함정이다.Task
Action
infra/nginx/extractor.conf의 proxy location 에proxy_set_header Host $host;한 줄을 추가하고, 함정의 실측 근거를 주석으로 남겼다.Result
연관 이슈
Summary by CodeRabbit