Skip to content

Commit

Permalink
default cookies to insecure for development
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Mar 3, 2017
1 parent c631dcb commit abcf6a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var session = require('express-session');
var config = require('config');

var app = express();

Expand All @@ -27,7 +28,7 @@ app.use(session({
secret: 'pedigree browser session secret',
resave: false,
saveUninitialized: false,
cookie: { secure: true }
cookie: { secure: config.get('session.cookie.secure') }
}));

// Use morgan to log all incoming requests. Defaults to Apache style logs.
Expand Down
5 changes: 5 additions & 0 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
"FS": {
"environment": "integration",
"appKey": "a02j000000KTRjpAAH"
},
"session": {
"cookie": {
"secure": false
}
}
}
5 changes: 5 additions & 0 deletions config/production.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"FS": {
"environment": "production"
},
"session": {
"cookie": {
"secure": true
}
}
}

0 comments on commit abcf6a9

Please sign in to comment.