Hey Tarique,
Something like:
$(document).ajaxSend(function(e, xhr, settings) {
xhr.setRequestHeader('X-CSRF-Token', '?=
$this-request-params['_csrfToken'] ?');
});
Should do the trick.
-Mark
On Monday, 1 September 2014 00:02:30 UTC-4, Dr. Tarique Sani wrote:
Thanks, would really appreciate some code to look at. Please do post if you
can when you get to a real computer.
Tarique
On Sat, Aug 30, 2014 at 6:11 PM, mark_story mark.st...@gmail.com wrote:
I do this by adding a header with a jQuery beforeSend hook. I don't have
an example handy as I am
I do this by adding a header with a jQuery beforeSend hook. I don't have an
example handy as I am not at a real computer right now.
-mark
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are
Hi,
Can anyone share some example code on how to send the X-CSRF-Token header
containing the CSRF Token as mentioned in
http://book.cakephp.org/3.0/en/core-libraries/components/csrf-component.html#csrf-protection-and-ajax-requests
Thanks
Tarique
--