Skip to content

Commit

Permalink
bump koa-session@3
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Jan 3, 2015
1 parent 67abd5e commit adb2dbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion csrf/app.js
Expand Up @@ -11,7 +11,7 @@ var app = module.exports = koa();
*/

app.keys = ['session key', 'csrf example'];
app.use(session());
app.use(session(app));

/**
* maybe a bodyparser
Expand Down
5 changes: 2 additions & 3 deletions flash-messages/app.js
Expand Up @@ -11,8 +11,7 @@ var app = module.exports = koa();

// required for signed cookie sessions
app.keys = ['key1', 'key2'];

app.use(session());
app.use(session(app));

app.use(function *(next){
if (this.method !== 'GET' || this.path !== '/messages') return yield next;
Expand Down Expand Up @@ -41,4 +40,4 @@ app.use(function *(next){
this.status = 204;
})

if (!module.parent) app.listen(3000);
if (!module.parent) app.listen(3000);
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"koa-csrf": "^2.1.1",
"koa-logger": "^1.2.1",
"koa-route": "^1.1.4",
"koa-session": "^2.0.0",
"koa-session": "^3.1.0",
"koa-static": "^1.4.5",
"raw-body": "^1.2.1",
"save-to": "^1.0.3",
Expand Down

0 comments on commit adb2dbd

Please sign in to comment.