크로스도메인 withCredentials 관련

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

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>

번호 제목 글쓴이 날짜 조회 수
217 iframe auto resize (cross browsing) 황제낙엽 2011.05.13 658
216 Javascript CORS/XSS 극복하는(피하는) 방법 file 황제낙엽 2017.07.31 648
215 [JavaScript Tutorials] Introducing the closure (해석중) 황제낙엽 2009.04.10 555
214 입력받은 날짜와 현재 날짜와의 비교 함수 황제낙엽 2019.08.02 500
213 Javascript 를 사용하여 Binary File 읽기 황제낙엽 2010.09.29 500
212 url encode & decode 황제낙엽 2011.10.30 469
211 자바스크립트로 서버의 XML파일을 접근 (실패했슴) 황제낙엽 2005.12.11 444
210 XMLHttpRequest 의 이벤트 onreadystatechange 황제낙엽 2012.05.30 412
209 Defining classes and inheritance (클래스 정의와 상속) 황제낙엽 2011.03.24 392
208 Javascript 내장객체 String 황제낙엽 2007.04.10 392
207 JavaScript Array.push Performance 황제낙엽 2011.11.21 380
206 JavaScript Touch and Gesture Events iPhone and Android 황제낙엽 2012.04.12 337
205 Faster JavaScript Memoization For Improved Application Performance 황제낙엽 2011.11.04 333
204 진행 상황 추적하기(XMLHttpRequest.readyState) file 황제낙엽 2012.05.23 324
203 String Performance: Getting Good Performance from Internet Explorer (IE7) 황제낙엽 2011.11.24 312
202 window.postMessage() 황제낙엽 2020.07.29 303
201 unshift() Method 황제낙엽 2009.03.02 287
200 CORS(Cross-Origin Resource Sharing) - 5 file 황제낙엽 2017.03.07 261
199 Jasmine 테스트 및 CI 구축 가이드 황제낙엽 2016.11.16 254
198 정규식 정리 황제낙엽 2008.11.24 252