Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge pull request #14 from acrmp/update-readme-csrf

Replace csrf example with protection.
  • Loading branch information...
commit eee4f22c7f3f5160bb2b8a5c65fb08b43c89f383 2 parents e887061 + 76741c3
@rkh rkh authored
Showing with 5 additions and 4 deletions.
  1. +5 −4
@@ -30,8 +30,6 @@ Currently included:
* `sinatra/content_for`: Adds Rails-style `content_for` helpers to Haml, Erb,
Erubis and Slim.
-* `sinatra/csrf`: Protects your Sinatra application from CSRF attacks.
* `sinatra/engine_tracking`: Adds methods like `haml?` that allow helper
methods to check whether they are called from within a template.
@@ -43,6 +41,9 @@ Currently included:
* `sinatra/namespace`: Adds namespace support to Sinatra.
+* `sinatra/protection`: Sets up rack-protection to protect common attacks
+ against your application.
* `sinatra/respond_with`: Choose action and/or template depending automatically
depending on the incoming request. Adds helpers `respond_to` and
@@ -99,13 +100,13 @@ A single extension (example: sinatra-content-for):
``` ruby
require 'sinatra/base'
require 'sinatra/content_for'
-require 'sinatra/csrf'
+require 'sinatra/protection'
class MyApp < Sinatra::Base
# Note: Some modules are extensions, some helpers, see the specific
# documentation or the source
helpers Sinatra::ContentFor
- register Sinatra::CSRF
+ register Sinatra::Protection
Please sign in to comment.
Something went wrong with that request. Please try again.