Skip to content

Feature #69 : Proxy 서버 추가#70

Merged
andrewkimswe merged 1 commit intodevelopfrom
feat/#69
Feb 14, 2025
Merged

Feature #69 : Proxy 서버 추가#70
andrewkimswe merged 1 commit intodevelopfrom
feat/#69

Conversation

@andrewkimswe
Copy link
Member

📌 Summary


Description

Kream 크롤링 시 CORS 문제 해결을 위한 프록시 서버 추가

  • 프론트엔드에서 Kream API를 직접 호출할 경우, CORS 정책으로 인해 차단되는 문제 발생
  • 이를 해결하기 위해 백엔드에서 프록시 서버를 추가하여 요청을 우회하도록 구현
  • 프론트엔드는 기존 Kream API 직접 호출 방식에서 백엔드 프록시를 경유하는 방식으로 변경

🔧 구현 내용

  • ProxyController 추가

    • /api/proxy/kream 엔드포인트 생성
    • 요청된 URL을 백엔드에서 대신 호출하고, 응답을 프론트엔드로 전달
  • 프론트엔드 요청 방식 수정

    • 기존: https://kream.co.kr/api/...
    • 변경: https://backend-api.com/api/proxy/kream?url=https://kream.co.kr/api/...
  • CORS 설정 변경

    • 백엔드 프록시 엔드포인트에서 모든 도메인 허용
  • 테스트

    • 로컬 및 배포 환경에서 프록시 서버 정상 작동 확인
    • 크롤링 데이터 정상적으로 반환되는지 검증

🗒️ Review Point

혹시 궁금한 부분이나 수정이 필요한 사항이 있다면 알려주세요!

@andrewkimswe andrewkimswe added 🚨 Hotfix 긴급 수정 ✨ feature 기능 개발 📡 API API 관련 코드 작성 ⚙️ setting 프로젝트 세팅 labels Feb 14, 2025
@andrewkimswe andrewkimswe added this to the 🔥 Final Deployment milestone Feb 14, 2025
@andrewkimswe andrewkimswe self-assigned this Feb 14, 2025
@andrewkimswe andrewkimswe linked an issue Feb 14, 2025 that may be closed by this pull request
3 tasks
@andrewkimswe andrewkimswe merged commit 471120b into develop Feb 14, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📡 API API 관련 코드 작성 ✨ feature 기능 개발 🚨 Hotfix 긴급 수정 ⚙️ setting 프로젝트 세팅

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat : Proxy 서버 추가

1 participant