Supabase 환경 변수와 API 클라이언트 설정 업데이트#15
Conversation
- api 요청 경로를 api에서 functions로 변경 - 토큰 발급 요청에 apikey 헤더 포함하도록 설정 추가
📝 WalkthroughWalkthrough환경 변수 설정과 API 클라이언트 구성을 업데이트했습니다. CI/CD 워크플로우에 Supabase 공개 키를 추가했고, Axios 인스턴스의 기본 URL을 함수 엔드포인트로 변경하며, 게스트 토큰 요청 시 API 키를 자동으로 첨부하는 로직을 구현했습니다. Changes
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/shared/api/axios.ts (1)
30-36: URL 매칭 방식이 깨지기 쉬울 수 있습니다.
endsWith('user/guest/token')는 URL에 쿼리 파라미터(?foo=bar)나 trailing slash가 붙는 경우 매칭에 실패할 수 있습니다. 현재로서는 문제없을 수 있지만, 향후 확장성을 고려해 더 견고한 매칭 방식을 권장합니다.♻️ 제안하는 수정 방안
- else if (newConfig.url?.endsWith('user/guest/token')) { + else if (newConfig.url?.includes('user/guest/token')) {또는 정규식을 사용하여 더 명확하게 매칭할 수 있습니다:
- else if (newConfig.url?.endsWith('user/guest/token')) { + else if (/user\/guest\/token(?:\?|$)/.test(newConfig.url ?? '')) {
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/prod-ci-cd.ymlsrc/shared/api/axios.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-28T04:24:56.857Z
Learnt from: yoouyeon
Repo: moddo-kr/moddo-frontend PR: 12
File: src/pages/login/LoginEntranceView.tsx:13-20
Timestamp: 2025-12-28T04:24:56.857Z
Learning: Guideline: Do not pass raw numbers for spacing props (e.g., gap, padding, margin) to the Flex component. If the design system uses tokenized spacing (theme.unit[...] ), derive spacing from design tokens instead of hard-coded numbers only if the component expects a direct number. In this case, the correct usage is to pass plain numbers (e.g., 16) directly for spacing props used by Flex, rather than theme.unit[16]. Apply this consistently across TSX files where Flex spacing props are used. This improves readability and ensures consistent spacing values align with design tokens.
Applied to files:
src/shared/api/axios.ts
🔇 Additional comments (3)
src/shared/api/axios.ts (1)
5-5: LGTM!Supabase Edge Functions 엔드포인트(
/functions/v1)로의 baseURL 변경이 올바르게 적용되었습니다..github/workflows/prod-ci-cd.yml (2)
51-51: LGTM!Supabase 공개 키가 CI/CD 환경 변수에 올바르게 추가되었습니다.
GitHub 저장소 Settings > Secrets에
VITE_SUPABASE_PUBLIC_KEY시크릿이 설정되어 있는지 확인해 주세요. 설정되지 않은 경우 빌드 시 apikey 헤더가 빈 값으로 설정될 수 있습니다.
62-62: LGTM!포맷팅 정리 확인했습니다.
💻 작업 내용
supabase edge function을 사용하기 위한 변경사항입니다.
VITE_SERVER_URL: supabase 서버 경로로 변경VITE_SUPABASE_PUBLIC_KEY: 게스트 로그인 요청에서 헤더에 추가하는 public keySummary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.