Welcome Guest, Not a member yet? Register   Sign In
ajax post csrf problem 403 error
#4

(This post was last modified: 04-17-2017, 02:32 AM by PaulD.)

It might be best to not turn of CSRF regeneration, otherwise you could be opening your site to some problems.

Another way to deal with this without turning off regeneration is to read the CSRF value in your javascript from a hidden field or a 'data-xxx' value somewhere on the page. Once you have used it, you can use ajax to get a new value and update it on your page. Or you can simply return the new value in your first ajax call and refresh a value from there.

https://www.codeigniter.com/user_guide/l...rgery-csrf

If you need any further help with this post here again and I will post some sample code.

Best wishes,

Paul.
Reply


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 PaulD - 04-17-2017, 02:31 AM
RE: ajax post csrf problem 403 error - by PaulD - 04-17-2017, 03:29 AM
RE: ajax post csrf problem 403 error - by PaulD - 04-17-2017, 05:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB