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

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() ?>'}),
Reply


Messages In This Thread
RE: I have a problem with ajax and csrf - The action you requested is not allowed. - by iRedds - 08-29-2021, 10:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB