Can’t verify CSRF token authenticity

  question, ruby

Question:

The same interface request works normally with get.
Use post request prompt:
Can’t verify CSRF token authenticity

Temporary solution

Skip validation in controller

skip_before_action :verify_authenticity_token, :only => ["your_update_action"]

http://stackoverflow.com/questions/19390389/using-curl-to-access-backend-api-of-rails-app-that-implements-devise

Follow-up questions

How to send token authentication through post request?

Get does not validate csrf. Did you put your csrf_token in the requested body?