Spring boot - ajax 통신시 발생하는 문제 - SOP(Same Origin Policy) Feat. Synology NAS

우선, SOP가 뭐냐? wiki 백과 왈 ~ In computing , the same-origin policy is an important concept in the web application security model . Under the policy, a web browser permits scripts contained in a first web page to access data in a second web page, but only if both web pages have the same origin . same-origin policy는 웹어플리케이션 보안 모델에서 중요한 개념이라고 한다. 웹 브라우저는 첫 번째 웹 페이지에 포함 된 스크립트가 두 번째 웹 페이지의 데이터에 접근하는 것을 허용하지만 두 웹페이지 모두 동일한 출처 를 갖는 경우에만 허용된다고 한다. 그렇다면 , 동일한 출처가 뭐냐? 프로토콜/호스트/포트 가 동일한가 라고 한다. 예를들어, http://abc.dfg.com/temp/index.html 과 동일한 출처를 알아보자. http://abc.dfg.com/temp/login.html => 동일한 출처. http://abc.dfg.com/temp2/fake.html => 동일한 출처. https://abc.dfg.com/temp/real.html => 프로토콜 이 다르다. 따라서 동일한 출처가 아니다. http://abc.dfe.com:123/temp/isReal.html => 포트 가 다르다. 따라서 동일한 출처가 아니다. http://dfe.abc.com/temp/good.html => 호스트 가 다르다. ...