Skip to content
Browse files

disable session_secret for Sinatra::Application in development mode (…

…makes sessions usable out of the box with shotgun)
  • Loading branch information...
1 parent 13b79de commit 3dd50eadd62297cf65e497ca83a74c86cd4bfc6b @rkh rkh committed
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/sinatra/base.rb
View
1 lib/sinatra/base.rb
@@ -1476,6 +1476,7 @@ class Application < Base
set :logging, Proc.new { ! test? }
set :method_override, true
set :run, Proc.new { ! test? }
+ set :session_secret, Proc.new { super() unless development? }
def self.register(*extensions, &block) #:nodoc:
added_methods = extensions.map {|m| m.public_instance_methods }.flatten

0 comments on commit 3dd50ea

Please sign in to comment.
Something went wrong with that request. Please try again.