ajax post csrf problem 403 error |
Hello everyone
I know this topic got discussed many time .. yet I could not make it run without problems first of all .. I set csrf to true PHP Code: $config['csrf_protection'] = TRUE; now I included csrf token/value in the data sent by ajax and it works for the first time ( as csrf is present and it is correct ) in the second time ajax tries to run .. I get 403 error ( as the sent csrf is still the same not changed ( not refreshed page ) ) i found that the first post will change the token value of csrf how should I work with that and make it run ? here is my code ( note that Iam using smary ) PHP PHP Code: $this->vars['csrf'] = array( HTML Code: <input type="text" class="form-control" name=atitle id=atitle> |
Messages In This Thread |
ajax post csrf problem 403 error - by arabgenius - 04-16-2017, 02:42 PM
RE: ajax post csrf problem 403 error - by GGitzOle - 04-17-2017, 01:52 AM
RE: ajax post csrf problem 403 error - by arabgenius - 04-17-2017, 02:11 AM
RE: ajax post csrf problem 403 error - by PaulD - 04-17-2017, 02:31 AM
RE: ajax post csrf problem 403 error - by arabgenius - 04-17-2017, 02:43 AM
RE: ajax post csrf problem 403 error - by PaulD - 04-17-2017, 03:29 AM
RE: ajax post csrf problem 403 error - by arabgenius - 04-17-2017, 04:20 AM
RE: ajax post csrf problem 403 error - by PaulD - 04-17-2017, 05:46 AM
RE: ajax post csrf problem 403 error - by dave friend - 04-17-2017, 01:07 PM
|