Welcome Guest, Not a member yet? Register   Sign In
I have a problem with ajax and csrf - The action you requested is not allowed.
#4

(08-29-2021, 10:34 PM)iRedds Wrote: You are not sending JSON, but a key = value pair
You need to convert JS object to JSON
Code:
data : JSON.stringify({'<?= csrf_token() ?>':'<?= csrf_hash() ?>'}),
hello,
i do this and work but the problem is work on first time only! so when i reclick on button to call ajax function i see agin the error " The action you requested is not allowed."
How can fix this without reload the page?
Reply


Messages In This Thread
RE: I have a problem with ajax and csrf - The action you requested is not allowed. - by pws - 08-10-2022, 11:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB