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', '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  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.


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  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.


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 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.


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

-- 
=
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.