Skip to content

Commit

Permalink
Merge pull request stringer-rss#461 from maxmeyer/patch-2
Browse files Browse the repository at this point in the history
Make SECRET_TOKEN random by default
  • Loading branch information
gabrielpoca authored Sep 27, 2017
2 parents e2f49ed + 22b4ec2 commit d642b50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require "will_paginate/active_record"
require "sprockets"
require "sprockets-helpers"
require "securerandom"

require_relative "app/helpers/authentication_helpers"
require_relative "app/repositories/user_repository"
Expand All @@ -33,7 +34,7 @@ class Stringer < Sinatra::Base
set :root, File.dirname(__FILE__)

enable :sessions
set :session_secret, ENV["SECRET_TOKEN"] || "secret!"
set :session_secret, ENV["SECRET_TOKEN"] || SecureRandom.hex(32)
enable :logging
enable :method_override

Expand Down

0 comments on commit d642b50

Please sign in to comment.