Sails JS + AngularJS error: CSRF mismatch

Feel free to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

I was trying to build signup functionality with AngularJS frontend and sailsjs backend rest API. I created a simple angular post request but it was giving me following error in the browser:

CSRF mismatch

so I added the following lines to the top of post request:

Now it’s working like a charm. Please feel free to comment if you like this solution or have a better solution.

Feel free to share...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone
  • Lakshman Kashyap

    hi qasim how ignore for mobile api csrf