mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:03:40 +08:00
Get secret_token from ENV['SECRET_TOKEN'] (e.g. for Heroku)
This commit is contained in:
parent
5c986be753
commit
de154f3ef1
|
@ -13,6 +13,9 @@
|
|||
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"
|
||||
if Rails.env.production? && ENV['SECRET_TOKEN'].blank?
|
||||
raise 'SECRET_TOKEN environment variable must be set!'
|
||||
end
|
||||
Discourse::Application.config.secret_token = ENV['SECRET_TOKEN']
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user