Merge pull request #320 from jk779/secret_token

Get secret_token from ENV['SECRET_TOKEN'] (e.g. for Heroku)
This commit is contained in:
Robin Ward 2013-03-02 08:04:00 -08:00
commit a0218ffece
1 changed files with 2 additions and 1 deletions

View File

@ -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