DevStreams
DevStreams copied to clipboard
Add ValidateAntiForgeryToken Attribute on Post methods
Since we are posting the data through axios
we have to manually add the AntiForgeryToken
to the request as a cookie or as a header value to leverage the ASP.NET Core functionality.
Check out this post, it solves a similar issue.