No release in over a year
Backport of per-form CSRF tokens into Rails 4.2
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
< 1.4.0

Runtime

~> 4.2.0
 Project Readme

actionpack-per_form_csrf_tokens

Gem Version Test Test Coverage Maintainability

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.

  1. Fork the repository
  2. Create a feature branch: git checkout -b add-new-feature
  3. Commit your changes: git commit -am 'Add new feature'
  4. Push the branch: git push origin add-new-feature
  5. Send us a pull request

License

The gem is available as open source under the terms of the MIT License.