diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 857e80e3085..00934ec07d0 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -13,6 +13,7 @@ if Rails.env.test? || Rails.env.development? Discourse::Application.config.secret_token = "47f5390004bf6d25bb97083fb98e7cc133ab450ba814dd19638a78282b4ca291" else - raise "You must set a secret token in config/initializers/secret_token.rb" + raise "You must set a secret token in ENV['SECRET_TOKEN'] or in config/initializers/secret_token.rb" if ENV['SECRET_TOKEN'].blank? + Discourse::Application.config.secret_token = ENV['SECRET_TOKEN'] end