Re: CakePHP 3 - How to send X-CSRF-Token header

2014-09-01 Thread mark_story
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:

Re: CakePHP 3 - How to send X-CSRF-Token header

2014-08-31 Thread Dr. Tarique Sani
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

CakePHP 3 - How to send X-CSRF-Token header

2014-08-30 Thread mark_story
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

CakePHP 3 - How to send X-CSRF-Token header

2014-08-29 Thread Dr. Tarique Sani
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 --