I have Rails project which is working on production.
But on localhost it raises on every POST request with ActionController::InvalidAuthenticityToken
. I know what is it.
AuthToken is protection from csrf attacks. I have in my application_controller.rb
protect_from_forgery with: :exception #this line raise exception
and csrf_meta_tags
present.
I have no any problems in other Rails projects with it.
If I remove param with: :exception
session will reset after reloading page.
what is the problem?
protect_from_forgery
has paramwith: :null_session
by default. – Towhee