ai/chat에 Authorization 헤더 중계 추가 - #219
Merged
Merged
Conversation
/ai/chat 엔드포인트가 인증된 사용자의 토큰을 챗봇 서버(FastAPI)로 중계하지 않아 자습/안마의자/기상음악 예약 시 로그인이 필요하다는 응답이 반환되는 문제를 수정 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
#️⃣연관된 이슈
📝작업 내용
/ai/chat엔드포인트가 인증된 사용자의 Authorization 헤더를 챗봇 서버(FastAPI, Flooding-AI-V2)로 중계하지 않아, 자습/안마의자/기상음악 신청 등 예약 기능 사용 시 챗봇 서버가 "로그인이 필요합니다"를 반환하는 문제를 수정했습니다.AiController.chat()에@RequestHeader("Authorization")파라미터를 추가해 원본 요청의 Authorization 헤더를 받음SendAiChatService.execute()/SendAiChatServiceImpl시그니처에authorization파라미터를 추가해 하위 계층으로 전달AiChatbotAdapter.chat()/doChat()에authorization파라미터를 추가하고, RestClient 요청 시.header("Authorization", authorization)으로 명시적으로 헤더를 설정SendAiChatServiceTest수정 (Authorization 토큰이 어댑터로 그대로 전달되는지 검증하는 케이스 추가)챗봇 서버(FastAPI) 쪽은 이미 Authorization 헤더를 받아 처리하는 로직이 구현되어 있어, 별도 수정이 필요하지 않습니다.
스크린샷 (선택)
💬리뷰 요구사항(선택)