크로스도메인 withCredentials 관련

황제낙엽 2020.07.29 14:04 조회 수 : 410

sitelink1 http://www.w3.org/TR/XMLHttpRequest/#the...-attribute 
sitelink2  
sitelink3  
sitelink4  
extra_vars4  
extra_vars5  
extra_vars6  

- 동기(synchronous) ajax 호출시 withCredentials을 true로 설정하면 InvalidAccessError가 발생

- async옵션을 true로 하거나 withCredentials 설정을 false로 하면 정상 동작

- widthCredentials를 제거하면 서버에서 cookies, HTTP authentication, and client-side SSL certificates을 읽지 못함

- Cors 요청은 기본적으로 Non-Credential 요청, 따라서 HTTP Cookie와 HTTP Authentication 정보를 인지 못함

    -> 그래서 서버페이지에서 credential 을 true하면 문제가 해결된다

    -> response.setHeader("Access-Control-Allow-Credentials", "true");

        또는 <param-name>cors.support.credentials</param-name><param-value>true</param-value>

번호 제목 글쓴이 날짜 조회 수
226 각 브라우저 별 User Agent 정보 황제낙엽 2011.02.22 1278
225 CORS(Cross-Origin Resource Sharing) - 4 file 황제낙엽 2017.03.07 1225
224 자바스크립트의 쉬프트 연산자 (Shift Operator) 와 음수 (Negative) 이야기 황제낙엽 2012.05.31 1120
223 iframe auto resize (cross browsing) 황제낙엽 2011.05.13 1077
222 Javascript CORS/XSS 극복하는(피하는) 방법 file 황제낙엽 2017.07.31 1034
221 [JavaScript Tutorials] Introducing the closure (해석중) 황제낙엽 2009.04.10 1031
220 Memory leak 및 성능 측정 도구 file 황제낙엽 2011.11.23 1007
219 입력받은 날짜와 현재 날짜와의 비교 함수 황제낙엽 2019.08.02 938
218 SelectBox 밑에 CheckBox가 포함된 리스트 만들기 file 황제낙엽 2007.01.16 884
217 JavaScript Reserved Words 황제낙엽 2011.11.28 881
216 Javascript 를 사용하여 Binary File 읽기 황제낙엽 2010.09.29 857
215 현재 document 의 host 와 port 를 얻는 방법 황제낙엽 2023.10.03 829
214 JavaScript Touch and Gesture Events iPhone and Android 황제낙엽 2012.04.12 827
213 url encode & decode 황제낙엽 2011.10.30 818
212 Javascript ArrayBuffer ? Binary handling in javascript 황제낙엽 2012.03.19 817
211 JavaScript Array.push Performance 황제낙엽 2011.11.21 783
210 String Performance: Getting Good Performance from Internet Explorer (IE7) 황제낙엽 2011.11.24 769
209 Defining classes and inheritance (클래스 정의와 상속) 황제낙엽 2011.03.24 769
208 자바스크립트로 서버의 XML파일을 접근 (실패했슴) 황제낙엽 2005.12.11 762
207 call() and apply() methods in Javascript 황제낙엽 2011.10.07 754