CSRF giving problem with ajax |
I use CSFR protection on my site which is massively Ajaxified. I use a jquery plugin (https://github.com/carhartl/jquery-cookie) that makes handling cookies simple:
<script> var csrf_token = $.cookie('csrf_token'); </script> Then whenever I'm POSTing data with Ajax, I just need to include the csrf_token in the data object that's sent to the CI server. Works really well. |
Messages In This Thread |
CSRF giving problem with ajax - by tancredolt - 05-02-2015, 09:52 PM
RE: CSRF giving problem with ajax - by prabhakar - 05-03-2015, 06:25 AM
RE: CSRF giving problem with ajax - by PaulD - 05-04-2015, 09:06 AM
RE: CSRF giving problem with ajax - by matbeard - 05-06-2015, 07:20 AM
RE: CSRF giving problem with ajax - by josetrindade - 05-29-2015, 04:27 AM
RE: CSRF giving problem with ajax - by tancredolt - 05-29-2015, 12:45 AM
RE: CSRF giving problem with ajax - by techbat - 05-29-2015, 05:56 AM
RE: CSRF giving problem with ajax - by ebizzinfotech - 06-03-2019, 10:45 PM
RE: CSRF giving problem with ajax - by kintech - 09-30-2019, 05:16 AM
RE: CSRF giving problem with ajax - by albertleao - 09-30-2019, 08:36 AM
RE: CSRF giving problem with ajax - by deorwineinfotech - 03-02-2020, 11:47 PM
|