POST via Ajax returns 403 with CSRF enabled |
(04-06-2020, 12:08 PM)Gary Wrote: Once you've checked the setting CSRFRegenerate is FALSE, it may be worth trying setting dataType: 'html' in your AJAX routine (?). Hi Gary, The contentType was causing this malfunction... IMO it doesn't make any sense but at least now it's working, here the working Ajax function: Code: const sendContactForm = (contactFormData) => { Now that it works, could you please clarify if this is expected? Why the contentType was causing this? It should be included, don't you think? Thanks |
Messages In This Thread |
POST via Ajax returns 403 with CSRF enabled - by marcvidalim - 04-05-2020, 11:39 AM
RE: POST via Ajax returns 403 with CSRF enabled - by Gary - 04-06-2020, 08:27 AM
RE: POST via Ajax returns 403 with CSRF enabled - by marcvidalim - 04-06-2020, 09:30 AM
RE: POST via Ajax returns 403 with CSRF enabled - by Gary - 04-06-2020, 12:08 PM
RE: POST via Ajax returns 403 with CSRF enabled - by marcvidalim - 04-06-2020, 12:36 PM
RE: POST via Ajax returns 403 with CSRF enabled - by Gary - 04-06-2020, 03:16 PM
RE: POST via Ajax returns 403 with CSRF enabled - by marcvidalim - 04-08-2020, 02:23 AM
|