CORS란? No 'Access-Control-Allow-Origin' header is present in the requested resource. 에러해결


CORS란?   No 'Access-Control-Allow-Origin' header is present in the requested resource. 에러해결

웹 개발시 클라이언트단의 브라우저에서 외부 서버로 ajax 요청 시 자주 발생하는 실패 메세지. Fail to load '호출URI': No 'Access-Control-Allow-Origin' header is present in the requested resource. Origin '요청URI' is therefore not allowed access. 원인은 자바스크립트 엔진 표준스펙에 동일출처 정책(SOP:same-origin-policy) 보안 규칙 때문이다. SOP(Same-origin Policy) 자바스크립트에서 XMLHttpRequest로 외부서버 접근시에는 같은 출처(Same Origin)의 페이지로만 접근이 가능도록 하여 동일한 출처(프로토콜, 호스트명, 포트) 가 모두 일치해야 데..


원문링크 : CORS란? No 'Access-Control-Allow-Origin' header is present in the requested resource. 에러해결