Reputation: 2128
Is it necessary to store the keys for development and testing environments in an ENV variable before pushing code to GitHub? I understand why keys should be hidden in production, but not why they should be hidden in development or testing.
development:
secret_key_base: reallylongkey
test:
secret_key_base: anotherreallylongkey
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
If I push that to GitHub, and leave the development and testing keys public, would my app be in danger?
Upvotes: 0
Views: 748
Reputation: 8044
No it won't, as long as you are not deploying a rails app somewhere in development or test mode.
See What is the use of secret_key_base in rails 4
Upvotes: 1