진단 체크리스트
fetch example
const apiUrl = import.meta.env.VITE_API_URL;
if (!apiUrl) {
throw new Error('VITE_API_URL is missing');
}
const response = await fetch(apiUrl + '/health', {
method: 'GET',
credentials: 'include',
});Mixed Content 여부 확인
프론트가 HTTPS인데 API를 HTTP로 호출하면 브라우저가 요청 자체를 차단합니다.
wrong vs correct
# Wrong
https://app.example.com -> http://api.example.com
# Correct
https://app.example.com -> https://api.example.com실무 팁
이 에러는 콘솔 메시지만으로 원인 판단이 어렵습니다. 브라우저 Network + 서버 로그를 항상 함께 보세요.