Commit b29171d9 authored by Cyril Rohr's avatar Cyril Rohr

Allow to specify secret token via environment variable.

parent cad9572e
...@@ -9,7 +9,9 @@ require 'securerandom' ...@@ -9,7 +9,9 @@ require 'securerandom'
def find_secure_token def find_secure_token
token_file = Rails.root.join('.secret') 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. # Use the existing token.
File.read(token_file).chomp File.read(token_file).chomp
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment