ruby on rails - Can't verify CRF token yet authenticity_token is in form parameters -
this question has answer here:
i can see authenticity_token in form parameters when post yet getting error message:
started post "/helloasdf/destroy_task?id=29" 127.0.0.1 @ 2017-08-19 21:12:14 -0400 processing taskcontroller#destroy_task js parameters: {"authenticity_token"=>"xxxx", "id"=>"29", "task_url"=>"helloasdf"} can't verify csrf token authenticity. completed 422 unprocessable entity in 1ms (activerecord: 0.0ms)
(i changed token xxxx).
what problem or doing wrong?
my applicationcontroller has:
class applicationcontroller < actioncontroller::base protect_from_forgery with: :exception
this happened me while back, , couldn't figure out why out of blue started throwing error tried write something. after 5 hours of debugging realised had blocked cookies localhost:3000, , wild guess have too.
Comments
Post a Comment