Skip to content

yasaichi/actionpack-per_form_csrf_tokens

Repository files navigation

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.

About

◀️ Backport of per-form CSRF tokens into Rails 4.2

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published