README.md in angular_rails_csrf-4.5.0 vs README.md in angular_rails_csrf-5.0.0
- old
+ new
@@ -1,10 +1,11 @@
## AngularJS-style CSRF Protection for Rails
-[![Gem Version](https://badge.fury.io/rb/angular_rails_csrf.svg)](https://badge.fury.io/rb/angular_rails_csrf)
-[![Build Status](https://travis-ci.org/jsanders/angular_rails_csrf.svg)](https://travis-ci.org/jsanders/angular_rails_csrf)
+![Gem](https://img.shields.io/gem/v/angular_rails_csrf)
+[![Build Status](https://travis-ci.com/jsanders/angular_rails_csrf.svg?branch=master)](https://travis-ci.com/jsanders/angular_rails_csrf)
[![Test Coverage](https://codecov.io/gh/jsanders/angular_rails_csrf/graph/badge.svg)](https://codecov.io/gh/jsanders/angular_rails_csrf)
+![Downloads total](https://img.shields.io/gem/dt/angular_rails_csrf)
The AngularJS [ng.$http](http://docs.angularjs.org/api/ng.$http) service has built-in CSRF protection. By default, it looks for a cookie named `XSRF-TOKEN` and, if found, writes its value into an `X-XSRF-TOKEN` header, which the server compares with the CSRF token saved in the user's session.
This project adds direct support for this scheme to your Rails application without requiring any changes to your AngularJS application. It also doesn't require the use of `csrf_meta_tags` to write a CSRF token into your page markup, so it works for pure JSON API applications.
@@ -14,14 +15,18 @@
## Installation
Add this line to your application's *Gemfile*:
- gem 'angular_rails_csrf'
+```ruby
+gem 'angular_rails_csrf'
+```
And then execute:
- $ bundle
+```console
+$ bundle
+```
That's it!
## Configuration