mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Avoid Rack security warning no secret provided
This avoids "SECURITY WARNING: No secret option provided to Rack::Session::Cookie."
This commit is contained in:
parent
fa3f51f734
commit
cb3181e81e
1 changed files with 2 additions and 0 deletions
|
@ -21,6 +21,8 @@ module ActionDispatch
|
|||
module Compatibility
|
||||
def initialize(app, options = {})
|
||||
options[:key] ||= '_session_id'
|
||||
# FIXME Rack's secret is not being used
|
||||
options[:secret] ||= SecureRandom.hex(30)
|
||||
super
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue