Welcome Guest, Not a member yet? Register   Sign In
CSRF with fetch API
#4

That was just some example code. Regardless of your method you should still try setting the header:

headers: {
"Content-Type": "application/json",
"X-Requested-With": "XMLHttpRequest"
}

That will signify to CodeIgniter that this is an AKAX request and (hopefully) will get your CSRF working on the backend.
Reply


Messages In This Thread
CSRF with fetch API - by Leo - 07-01-2020, 11:04 AM
RE: CSRF with fetch API - by MGatner - 07-07-2020, 10:26 AM
RE: CSRF with fetch API - by Leo - 07-07-2020, 12:51 PM
RE: CSRF with fetch API - by MGatner - 07-07-2020, 04:20 PM
RE: CSRF with fetch API - by Leo - 07-08-2020, 08:41 AM
RE: CSRF with fetch API - by InsiteFX - 07-08-2020, 11:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB