CSRF token to headers for AJAX POST. Fix for #113
This is how you do a JS post with the CSRF Protection ``` $.ajax({ url: "http://test.com", type:"post" headers: {'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')}}) ```
This commit is contained in:
@ -5,6 +5,7 @@ html
|
||||
meta(http-equiv='X-UA-Compatible', content='IE=edge')
|
||||
meta(name='viewport', content='width=device-width, initial-scale=1.0')
|
||||
meta(name='description', content='')
|
||||
meta(name='csrf-token', content=token)
|
||||
meta(name='author', content='')
|
||||
title #{title} | Hackathon Starter
|
||||
!= css('styles')
|
||||
|
Reference in New Issue
Block a user