Skip to content

Commit

Permalink
Configuring session cookie better
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed May 21, 2017
1 parent fce665d commit 0f4fe06
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
"redis": {
"host": "127.0.0.1",
"port": 6379
},
"cookie": {
"path": "/",
"httpOnly": true,
"secure": true,
"maxAge": 900000
}
},
"ssl": {
Expand Down
1 change: 1 addition & 0 deletions lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function auth (obj, config) {

if (stateful) {
sesh = {
cookie: config.session.cookie,
secret: config.session.secret || uuid(),
saveUninitialized: true,
rolling: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an elastic REST API gateway for node.js",
"version": "4.5.4",
"version": "4.5.5",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down
Loading

0 comments on commit 0f4fe06

Please sign in to comment.