-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to expire the csrf token? #12
Comments
I am trying
It works but I am not sure it's the best way and how it impacts on the performance. |
I think it's better if in an after filter you remove the key from session; something like (untested):
|
Ok, but if I remove it, will a new random one be generated and injected? |
Nvm, scrap it: it would remove the token before Rack::Csrf had a chance to look at it. |
So far the "before approach" seems to work. It's tricky in the case of Ajax calls that use the
|
I was wondering, is there a way to tweak the expiration of the csrf token?
Or even better, generate a new random one for each new request?
The text was updated successfully, but these errors were encountered: