I enabled CSRF validation and normal form can work, but I cant make a request with ajax.
I need to check automatically for new messages on the db without user interaction,
tried to use the getCrsfToken () but did not work.
I get the message:
The CSRF token can not be verified.
The request could not be understood by the server due to malformed syntax. Please do not repeat the request without modifications.
If you think this is a server error, please contact the webmaster.
Does anybody know the solution?