I have implemented CSRF Guard into my web application. It's working fine for GET requests (with AJAX and without AJAX) however for POST request token is not getting injected into the request that's why CSRF guard throwing an exception:
Token is missing in the request.
My question here is:
- CSRF Guard injects token into POST request or not? If YES then what I have to look for to make it work.
- Do I have to change my POST requests to make it work with CSRF guard? (Save the token into hidden fields and use it for POST requests.)
Please let me know your points if you know about it. Thanks.