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:
Brian Ridings
2014-03-27 14:09:13 -04:00
parent a49ee82150
commit eb0332609c

View File

@ -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')