cacheable-csrf-token-rails
cacheable-csrf-token-rails copied to clipboard
Cache HTML containing CSRF protection tokens without worrying
Cacheable CSRF Token for Rails
Cache HTML containing CSRF protection tokens without worrying
CacheableCSRFToken allows you to easily cache Ruby on Rails pages or partials containing a CSRF protection token. The user-specific token will inserted in the HTML before the response is sent to the user.
Usage
- Add
cacheable-csrf-token-rails
to your Gemfile - Add this line in ApplicationController:
include CacheableCSRFTokenRails