codedang icon indicating copy to clipboard operation
codedang copied to clipboard

[Bug]: Gitpod frontend에서 개발 서버 API 접근 불가

Open dotoleeoak opened this issue 1 year ago • 0 comments

Describe the bug

Gitpod에서 frontend 서버를 띄웠을 때(pnpm dev), CORS에러 때문에 API 호출이 안됩니다.

Reproduction

  1. Gitpod에서 frontend 서버 실행 (cd frontend && pnpm dev)
  2. problem 페이지 접속
  3. 로딩 상태 지속
image

Logs

Access to XMLHttpRequest at 'https://dev.codedang.com/api/problem?take=101' (redirected from 'https://5173-skkuding-codedang-bgtw6g51b85.ws-us105.gitpod.io/api/problem?take=101') from origin 'https://5173-skkuding-codedang-bgtw6g51b85.ws-us105.gitpod.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

System Info

  • Macbook Air M2
  • Chrome 버전 118.0.5993.88(공식 빌드) (arm64)

Validations

dotoleeoak avatar Oct 23 '23 06:10 dotoleeoak