actionpack-per_form_csrf_tokens
actionpack-per_form_csrf_tokens
is a backport of per-form CSRF tokens (introduced in Rails 5) into Rails 4.2.
Note that this gem only adds some patches into ActionController::Base
to "accept" new-format tokens, because it's aimed for enabling Rails 4.2 apps to exchange them with Rails 5.x or higher ones.
Installation
Add this line to your application's Gemfile:
gem 'actionpack-per_form_csrf_tokens'
And then execute:
$ bundle
Usage
You don't need anything other than install.
Contributing
You should follow the steps below.
- Fork the repository
- Create a feature branch:
git checkout -b add-new-feature
- Commit your changes:
git commit -am 'Add new feature'
- Push the branch:
git push origin add-new-feature
- Send us a pull request
License
The gem is available as open source under the terms of the MIT License.