保持数据库的 API 密钥和访问详细信息安全的最佳做法是什么?
我们将使用 Nodejitsus 进行部署,jitsu deploy
所以我的想法是拥有一个不属于 git 的配置文件。
我们当前的配置文件,我将拥有 .gitignore'd
module.exports = (app) ->
app.configure 'development', ->
global.config =
dbUrl: 'mongodb://username:password@host:port/closet'
foursquare:
client_id: 'xxx'
client_secret: 'xxx'
redirect_uri: 'http://127.0.0.1:3000/account/auth/foursquare/done'
return
app.configure 'production', ->
global.config =
dbUrl: 'mongodb://username:password@host:port/closet'
foursquare:
client_id: 'yyy'
client_secret: 'yyy'
redirect_uri: 'http://example.com/account/auth/foursquare/done'
return
return