mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
document session_secret
This commit is contained in:
parent
654eebb054
commit
87bdb85ff1
1 changed files with 7 additions and 0 deletions
|
@ -799,6 +799,13 @@ middleware of choice how you would any other middleware:
|
||||||
session[:value] = params[:value]
|
session[:value] = params[:value]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
To improve security, the session data in the cookie is signed with a session
|
||||||
|
secret. A random secret is generate for you by Sinatra. However, since this
|
||||||
|
secret will change with every start of your application, you might want to
|
||||||
|
set the secret yourself, so all your application instances share it:
|
||||||
|
|
||||||
|
set :session_secret, 'super secret'
|
||||||
|
|
||||||
=== Halting
|
=== Halting
|
||||||
|
|
||||||
To immediately stop a request within a filter or route use:
|
To immediately stop a request within a filter or route use:
|
||||||
|
|
Loading…
Reference in a new issue