toLowerCase of undefined (1) 썸네일형 리스트형 Spring / jQuery ajax 사용시 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 오류 오류 jQuery로 $.ajax 호출하는데 다음과 같은 오류가 발생했다. Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 원인을 알아보니 스프링 시큐리티 csrf 설정 관련 오류이다. 사용자 인증 되지 않은 상태(비로그인)에서는 $(document).ajaxSend ajax 설정에서 token과 header가 null로 넘어가서 발생한 오류이다. 해결 token, header null 체크를 추가했다. 해결 전 $(function () { var token = $("meta[name='_csrf']").attr('content'); var header = $("meta[name='_.. 이전 1 다음