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 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 subscribed to the Google Groups >> "CakePHP" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to cake-php+unsubscr...@googlegroups.com. >> To post to this group, send email to cake-php@googlegroups.com. >> Visit this group at http://groups.google.com/group/cake-php. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > ============================================================= > Hire a CakePHP dev team : http://sanisoft.com > ============================================================= > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.