2013-02-06 03:16:51 +08:00
|
|
|
|
|
|
|
# Definitely change this when you deploy to production. Ours is replaced by jenkins.
|
2013-02-18 14:34:43 +08:00
|
|
|
# This token is used to secure sessions, we don't mind shipping with one to ease test and debug,
|
2013-02-26 00:42:20 +08:00
|
|
|
# however, the stock one should never be used in production, people will be able to crack
|
|
|
|
# session cookies.
|
2013-02-18 14:34:43 +08:00
|
|
|
#
|
2013-02-21 09:32:32 +08:00
|
|
|
# Generate a new secret with "rake secret". Copy the output of that command and paste it
|
|
|
|
# in your secret_token.rb as the value of Discourse::Application.config.secret_token:
|
|
|
|
#
|
2013-02-26 00:42:20 +08:00
|
|
|
# Discourse::Application.config.secret_token = "SET_SECRET_HERE"
|
2013-02-18 14:34:43 +08:00
|
|
|
|
2013-03-11 08:21:56 +08:00
|
|
|
if Rails.env.test? || Rails.env.development? || Rails.env == "profile"
|
2013-02-26 00:42:20 +08:00
|
|
|
Discourse::Application.config.secret_token = "47f5390004bf6d25bb97083fb98e7cc133ab450ba814dd19638a78282b4ca291"
|
|
|
|
else
|
2013-03-02 12:58:05 +08:00
|
|
|
raise "You must set a secret token in ENV['SECRET_TOKEN'] or in config/initializers/secret_token.rb" if ENV['SECRET_TOKEN'].blank?
|
2013-03-02 06:55:49 +08:00
|
|
|
Discourse::Application.config.secret_token = ENV['SECRET_TOKEN']
|
2013-02-18 14:34:43 +08:00
|
|
|
end
|
|
|
|
|