작성
·
326
0
강사님
store action에 아래 소스와 같이 적용하면 에러가 뜹니다.
Access to XMLHttpRequest at 'http://test.test.co.kr/api/sign/checked-id' from origin
http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is
'' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
이와 반대로 아래 소스와 같이 withCredentials:true를 지우면 api가 성공적으로 실행되더라구요.
withCredentials:true를 추가해야 cors 이슈가 없는 것 아닌가요??
어떤식으로 해결해야되는지 궁금합니다.
답변 부탁드리겠습니다 ㅎㅎ ㅠ
강사님이 말씀하신 설정은 아래 소스의 credentials: true, 맞을까요? ㅎㅎ