Merged
Conversation
Closed
6 tasks
|
✅ CI 통과했습니다!
|
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.
#️⃣ 연관된 이슈
#️⃣ 작업 내용
ky 인스턴스 설정
아래와 같은 기능이 들어 있습니다
1. 환경 변수 기반 API Endpoint 관리
VITE_API_URL이 설정되지 않은 경우 애플리케이션 시작 시 즉시 에러 발생2. 공통 Request 설정
prefixUrl을 통한 API Base URL 일괄 적용credentials: 'include'설정으로 세션 기반 인증 지원Content-Type: application/json헤더 적용3. 재시도(Retry) 정책
GET,POST,PUT,DELETE,PATCH,OPTIONS408,429,500,502,503,5044. 요청–응답 시간 측정
beforeRequest단계에서 요청 시작 시간 기록afterResponse및beforeError에서 요청 소요 시간 계산WeakMap<NormalizedOptions, number>사용으로 메모리 누수 방지5. 개발 환경 전용 API 로깅
DEV 환경에서만 활성화
Request 로그
Authorization,Cookie헤더 마스킹 처리Response 로그
6. 민감 정보 보호
***로 마스킹7. 인증 에러(401 / 403) 통합 처리
beforeErrorhook에서 401 / 403 응답 감지AuthError로 변환하여 throw실제 UX 처리(로그아웃, 리다이렉트 등)는 상위 앱 레이어에서 처리
8. 네트워크 및 런타임 에러 대응
#️⃣ 테스트 결과
#️⃣ 변경 사항 체크리스트
#️⃣ 스크린샷 (선택)
#️⃣ 리뷰 요구사항 (선택)
코드 변경 줄 수가 많은 이유는
yarn.lock때문입니다...ky.ts만 확인해 주세요📎 참고 자료 (선택)