Replace csrf example with protection.

This commit is contained in:
Andrew Crump 2011-08-29 22:45:27 +01:00
parent f08a76f759
commit 35d2c0ddb3
1 changed files with 5 additions and 4 deletions

View File

@ -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
`respond_with`.
@ -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
end
```