Skip to content
Snippets Groups Projects
Commit 52a247da authored by Sid Sijbrandij's avatar Sid Sijbrandij
Browse files

Merge pull request #6783 from pkgr/allow-secret-token-env

Allow to specify secret token via SECRET_KEY_BASE environment variable.
parents 1b491c36 b29171d9
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -9,7 +9,9 @@ require 'securerandom'
 
def find_secure_token
token_file = Rails.root.join('.secret')
if File.exist? token_file
if ENV.key?('SECRET_KEY_BASE')
ENV['SECRET_KEY_BASE']
elsif File.exist? token_file
# Use the existing token.
File.read(token_file).chomp
else
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment