codedang
codedang copied to clipboard
[Bug]: Gitpod frontend에서 개발 서버 API 접근 불가
Describe the bug
Gitpod에서 frontend 서버를 띄웠을 때(pnpm dev
), CORS에러 때문에 API 호출이 안됩니다.
Reproduction
- Gitpod에서 frontend 서버 실행 (
cd frontend && pnpm dev
) - problem 페이지 접속
- 로딩 상태 지속
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
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines
- [X] Check that there isn't already an issue