Skip to content

Commit

Permalink
move session secret to config
Browse files Browse the repository at this point in the history
  • Loading branch information
janmonschke committed Nov 1, 2012
1 parent 98a50b9 commit b31c2b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ app.configure(function(){
app.use(express.session({
store: sessionStore,
key: 'cgipsid',
secret: 'aabdonie98gsdv79sdjsbv2624zihef',
secret: config.sessionSecret,
cookie: {
maxAge: 604800000
}
Expand Down
6 changes: 4 additions & 2 deletions server/config.js.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ if(process.env['NODE_ENV'] && process.env['NODE_ENV'] === 'production')
adminPassword: "",
databaseHost: "127.0.0.1",
databasePort: "5984",
salt: "keyboardcat"
salt: "keyboardcat",
sessionSecret: "anotherkeyboardcat"
};
else
exports.config = {
adminName: "",
adminPassword: "",
databaseHost: "127.0.0.1",
databasePort: "5984",
salt: "keyboardcat"
salt: "keyboardcat",
sessionSecret: "anotherkeyboardcat"
};

0 comments on commit b31c2b2

Please sign in to comment.