Invalid CORS request 디버깅

By | 2025년 9월 7일
Table of Contents

Invalid CORS request 디버깅

서버에 직접 접속 후, 헤더를 붙여서 테스트 하면 쉽다.
브라우저 로그보다 상세한 로그가 출력된다.

# 실제 도메인으로 접속 시도
curl -X POST https://api.mydomain.co.kr:8443/api/auth/login -H "Origin: https://mydomain.co.kr" -v

# nginx 를 프록시 서버로 사용하는 경우 (서버로 직접 접속)
curl -X POST http://localhost:9000/api/auth/login -H "Origin: https://mydomain.co.kr" -v

답글 남기기