반응형
Access to XMLHttpRequest at 'https://open.neis.go.kr/hub/schoolInfo?KEY=1addcd8b3de24aa5920d79df1bbe2ece&Type=json&pIndex=1&pSize=100&SCHUL_NM=%EC%86%A1%E3%85%8A' from origin 'http://localhost:3000' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
그 악명 높은 CORS 에러를 보았다.
Neis 라는 외부 API 통해서 데이터를 조회해야할 부분이 있어서 회원가입시에 이미 사용한적이 있는데
여기서는 정상 동작하고 있다.
근데 다른 페이지에서 또 조회할 필요성이 있어 조회하는 코드를 넣었더니
유독 다른 페이지에서만 CORS 에러를 무지하게 쏟아내고 있다.
정말 요즘은 산넘어 산이다...
이 에러는 어떻게 해결해 나갈지? 어떻게 해결했는지 자세하게 한번 다시 남기기로 할 것이다.
반응형
'Error 관리' 카테고리의 다른 글
| 정말 진절머리 나는 eslint 에러 (0) | 2023.06.21 |
|---|---|
| Invalid options object. Dev Server has been initialized ... (1) | 2023.06.08 |
| Definition for rule ... not found (1) | 2023.06.06 |
| Error: WHERE parameter "userId" has invalid "undefined" value 에러 (0) | 2023.02.13 |
| Error : Excountered two children with the same key ... (0) | 2023.01.13 |