Skip to content

Conversation

@yeonjin719
Copy link
Member

🚨 관련 이슈

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

  • 작업 내용

😅 미완성 작업

  • Task1

📢 논의 사항 및 참고 사항

@yeonjin719 yeonjin719 self-assigned this Aug 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 13, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • 신규 기능

    • 개발 서버에서 /api 경로를 자동 프록시하여 백엔드에 라우팅합니다.
  • 리팩터링

    • Vite 설정을 동적 구성으로 전환하고 실행 모드별 환경 변수를 로드하도록 개선했습니다.
  • 잡무(Chores)

    • 클라이언트 요청의 기본 API 경로를 /api로 통일해 개발 환경에서 일관된 통신 동작을 보장합니다.
    • 프록시 대상 주소를 환경 변수에서 읽어 적용하며, 경로 재작성으로 /api 접두어를 제거하도록 설정했습니다.

Walkthrough

axios 인스턴스의 baseURL을 환경변수 기반에서 ‘/api’로 변경. Vite 설정을 정적 객체에서 동적 함수로 전환하고, mode별 loadEnv로 VITE_API_BASE_URL을 읽어 서버 프록시(‘/api’ → 대상 URL, changeOrigin/secure, 경로 재작성)를 추가. 플러그인/alias/호스트/포트는 유지.

Changes

Cohort / File(s) Change Summary
HTTP 클라이언트 설정
src/api/axiosInstance.ts
baseURL을 import.meta.env.VITE_API_BASE_URL에서 '/api'로 변경. withCredentials 및 응답 인터셉터 로직은 동일. 공개 API 시그니처 변화 없음.
Vite 구성 및 프록시
vite.config.ts
정적 구성에서 동적 함수로 전환(defineConfig(({ mode }) => ...)). loadEnvVITE_API_BASE_URL 로드. /api 프록시 추가(target: 로드된 베이스 URL, changeOrigin/secure, 경로 재작성으로 /api 제거). 기존 플러그인/alias/host/port 유지. 기본 내보내기 시그니처가 함수 기반으로 변경.

Sequence Diagram(s)

sequenceDiagram
  participant B as Browser (App)
  participant F as Frontend (Vite Dev)
  participant P as Vite Proxy (/api → target)
  participant S as Backend API (VITE_API_BASE_URL)

  B->>F: axios 요청 to /api/...
  F->>P: 프록시 매칭 (/api)
  P->>S: /... (경로에서 /api 제거)
  S-->>P: 응답
  P-->>F: 프록시 응답
  F-->>B: 앱에 응답 반환
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c26093f and 0fe6e4e.

📒 Files selected for processing (2)
  • src/api/axiosInstance.ts (1 hunks)
  • vite.config.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@yeonjin719 yeonjin719 merged commit 0eef3e0 into main Aug 13, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants