I don't want to commit the username/password combo for an e-mail server to Git, as the source code is made public. Is there a way to change it on Heroku itself?
Asked
Active
Viewed 309 times
1 Answers
3
https://devcenter.heroku.com/articles/config-vars
The traditional approach for handling such config vars is to put them under source - in a properties file of some sort. This is an error-prone process, and is especially complicated for open source apps which often have to maintain separate (and private) branches with app-specific configurations.
A better solution is to use environment variables, and keep the keys out of the code. On a traditional host or working locally you can set environment vars in your bashrc. On Heroku, you use config vars.
Use the Heroku CLI’s config, config:add, config:get and config:remove to manage your config vars:

Colonel Panic
- 132,665
- 89
- 401
- 465