Welcome Guest, Not a member yet? Register   Sign In
CSRF giving problem with ajax
#3

I have been using CSRF and Ajax without any issues with CI3.

If you are submitting your form with javascript, make sure you are writing the csrf hash into your js before posting anything. I do this by passing the hash in a page variable that I write as a var in my js. Then I do not have to worry about updating the form fields. However I suppose it depends how you are collecting your form fields.

Have you tried making the expire value higher, so that it does not change so frequently. Also, does the CSRF work on a normal form submit. Because if so it sounds like a problem in the js.

If you post some code I will have a look and see if I can spot anything.

Good luck

Paul.
Reply


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 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 kintech - 09-30-2019, 05:16 AM
RE: CSRF giving problem with ajax - by albertleao - 09-30-2019, 08:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB