mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-18 09:06:06 +10:00
Merge pull request #6783 from pkgr/allow-secret-token-env
Allow to specify secret token via SECRET_KEY_BASE environment variable.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user