Angular JS Verify CSRF Token in POST Request

前端 未结 3 1818
南笙
南笙 2021-01-29 22:53

I am using AngularJS with Rails. I have the following request which updates users in bulk.

 $http{
    method: \'POST\',
    url: $scope.update_url,
    params:          


        
3条回答
  •  攒了一身酷
    2021-01-29 23:38

    If you're wondering how to actually set a XSRF-TOKEN cookie value in Rails this answer has an implementation Rails CSRF Protection + Angular.js: protect_from_forgery makes me to log out on POST

提交回复
热议问题