diff options
Diffstat (limited to 'bucky/app/index.js')
| -rw-r--r-- | bucky/app/index.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bucky/app/index.js b/bucky/app/index.js index 704802c..efa5fdd 100644 --- a/bucky/app/index.js +++ b/bucky/app/index.js @@ -21,14 +21,16 @@ var app, server var site = module.exports = {} site.init = function(){ app = express() + app.enable('trust proxy'); app.set('port', process.env.PORT || 5000) app.use(favicon(__dirname + '../../../public/favicon.ico')) app.use(bodyParser.json()) - + app.use(cookieParser()); app.use(session({ - key: 'bucky.sid', secret: 'argonauts', - cookie: { domain: '.' + process.env.HOST_NAME, maxAge: 43200000000 }, + proxy: true, + key: 'bucky.sid', + cookie: {secure: true, domain: '.' + process.env.HOST_NAME, maxAge: 43200000000 }, store: new MongoStore({ url: 'mongodb://localhost/buckySessionDb' // type: 'mongodb', @@ -41,7 +43,7 @@ site.init = function(){ resave: true, saveUninitialized: false, })) - app.use(csurf({ cookie: false })) + app.use(csurf({ cookie: true })) app.disable('x-powered-by') app.use(express.query()) |
