1) view에서의 전달
<form action="/joinProc" method="post" name="joinForm"> <input type="text" name="username" placeholder="username"/> <input type="password" name="password" placeholder="password"/> <input type="hidden" name="_csrf" value="{{_csrf.token}}"/> <input type="submit" value="login"/> </form>2) ajax에서의 전달
<meta name="_csrf" content="{{_csrf.token}}"/> <meta name="_csrf_header" content="{{_csrf.headerName}}"/>ajax에서 호출 시에는 content명으로써 불러온 후 요청하며
JavaScript에서 XMLHttpRequest 요청시 setRequestHeader를 통해 _csrf, _csrf_header Key에 대한 토큰 값 넣어 요청하게된다.