• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
POST via Ajax returns 403 with CSRF enabled

#6
As far as I'm aware, contentType is a page header field.

I suspect when it arrives in your AJAX submission, it confuses things on the server side because it's not something that's expected.

I don't believe it's supposed to be included. data: is what is submitted to the server, and although there's two or three formats this data: can be, it is ultimately always converted to a query string before it is sent (so the server is only ever expecting this and not a programmer-spec'd contentType).
Reply


Messages In This Thread
RE: POST via Ajax returns 403 with CSRF enabled - by Gary - 04-06-2020, 03:16 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.