We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6145200 commit cf55b6fCopy full SHA for cf55b6f
config/initializers/secret_token.rb
@@ -16,4 +16,8 @@
16
# Using secret_token for rails3 compatibility. Change to secret_key_base
17
# to avoid deprecation warning.
18
# Can be safely removed in a rails3 api-only application.
19
-ActiveModelSerializersExample::Application.config.secret_token = '7569cb4b8ca08590785f826a8bed8b4930e3f40e672a3d5efa98d411c02931671d21a19297dde5b124dcb201cdde47a023414bf5c211990c2bbd5a03de14ebf5'
+ActiveModelSerializersExample::Application.config.secret_token = if Rails.env.development? or Rails.env.test?
20
+ ('x' * 30) # meets minimum requirement of 30 chars long
21
+else
22
+ ENV['SECRET_TOKEN']
23
+end
0 commit comments