Turning off authenticity token in Rails 2 for web services?

后端 未结 3 1688
旧时难觅i
旧时难觅i 2021-01-12 04:39

Instead of just filling out the form in HTML it should also be possible to just send a post request containing the params.. Is it possible to turn off the authenticity token

3条回答
  •  既然无缘
    2021-01-12 05:11

    Wouldn't it be easier to just add the authenticity token to every json request?

    Yes, but then the client would have to send a request first just to get the token and then another with the actual POST request, which does not make sense IMHO..

提交回复
热议问题