Skip to content

[!HOTFIX] Vercel SPA fallback rewrite로 새로고침 404 해결#24

Merged
BaeSeong-min merged 1 commit into
developfrom
!hotfix/#23
May 12, 2026
Merged

[!HOTFIX] Vercel SPA fallback rewrite로 새로고침 404 해결#24
BaeSeong-min merged 1 commit into
developfrom
!hotfix/#23

Conversation

@BaeSeong-min

Copy link
Copy Markdown
Contributor

🔍 PR 요약

어떤 변경을 했는지 간단히 설명해주세요.

  • Vercel 운영 환경에서 클라이언트 라우트 새로고침 시 404가 응답되던 문제 해결
  • vercel.json에 SPA fallback rewrite 추가

🧾 관련 이슈

이 PR이 관련된 이슈 번호를 명시해주세요.

🛠️ 주요 변경 사항

핵심 변경사항을 bullet point로 나열해주세요.

  • vercel.json 신규 추가
    {
      "rewrites": [
        { "source": "/(.*)", "destination": "/index.html" }
      ]
    }
  • 모든 unmatched 경로를 /index.html로 위임 → React Router가 클라이언트 사이드 라우팅 처리

🧠 의도 및 배경

왜 이 변경이 필요한지, 어떤 문제를 해결하는지 작성해주세요.

  • SPA(React Router) 특성상 /payments, /matches 같은 클라이언트 라우트는 빌드 결과물에 실제 정적 파일로 존재하지 않음
  • 새로고침은 브라우저가 서버에 실제 HTTP 요청을 보내는 동작이라, Vercel이 해당 경로의 정적 파일을 찾지 못해 404 응답
  • 모든 경로를 index.html로 fallback하면 SPA가 로드되고 React Router가 URL을 보고 알맞은 페이지를 렌더링

새로고침 시 클라이언트 라우트가 404로 떨어지던 문제 해결. 모든 경로를
/index.html로 rewrite하여 React Router가 처리하도록 vercel.json 추가.
@BaeSeong-min BaeSeong-min self-assigned this May 12, 2026
@vercel

vercel Bot commented May 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
k-statra-frontend Ready Ready Preview, Comment May 12, 2026 7:31am

@BaeSeong-min BaeSeong-min merged commit 87584b4 into develop May 12, 2026
3 checks passed
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@BaeSeong-min has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 1 second before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b5a5e259-969a-463b-a4d8-206f50363675

📥 Commits

Reviewing files that changed from the base of the PR and between 322a35e and a09ee9f.

📒 Files selected for processing (1)
  • vercel.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch !hotfix/#23

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[!HOTFIX] Vercel 배포 환경에서 새로고침 시 404 발생

1 participant