Update sessions documentation in readme
This commit is contained in:
parent
db0f8d5c78
commit
1c623006dc
10
README.md
10
README.md
|
@ -1413,7 +1413,7 @@ enable :sessions
|
|||
set :session_store, Rack::Session::Pool
|
||||
```
|
||||
|
||||
Or to enable sessions with a hash of options:
|
||||
Or to set up sessions with a hash of options:
|
||||
|
||||
```ruby
|
||||
set :sessions, :expire_after => 2592000
|
||||
|
@ -1421,13 +1421,9 @@ set :session_store, Rack::Session::Pool
|
|||
```
|
||||
|
||||
Another option is to **not** call `enable :sessions`, but instead pull in your
|
||||
middleware of choice as you would any other middleware:
|
||||
middleware of choice as you would any other middleware.
|
||||
|
||||
```ruby
|
||||
use Rack::Session::Pool, :expire_after => 2592000
|
||||
```
|
||||
|
||||
It is important to note that when using this method, session based protection (see 'Configuring attack protection') will not be enabled by default. The Rack middleware to do that will also need to be added:
|
||||
It is important to note that when using this method, session based protection (see 'Configuring attack protection') **will not be enabled by default**. The Rack middleware to do that will also need to be added:
|
||||
|
||||
```ruby
|
||||
use Rack::Session::Pool, :expire_after => 2592000
|
||||
|
|
Loading…
Reference in New Issue