Skip to content

Commit

Permalink
Set Sidekiq Web session secret same as Rack secret.
Browse files Browse the repository at this point in the history
  • Loading branch information
phlegx authored Apr 22, 2022
1 parent 21544f1 commit 3a0ce7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require './redis_config'
# Add Rack session cookie secret.
File.open('.session.key', 'w') { |f| f.write(SecureRandom.hex(32)) }
use Rack::Session::Cookie, secret: File.read('.session.key'), same_site: true, max_age: 86_400
Sidekiq::Web.set :session_secret, File.read('.session.key')

# Create Redis instance.
redis = proc {
Expand Down

0 comments on commit 3a0ce7e

Please sign in to comment.