koa-generic-session
Advanced tools
Comparing version 1.1.3 to 1.2.0
1.2.0 / 2014-08-09 | ||
================== | ||
* Merge pull request #25 from mekwall/patch-2 | ||
* Added description for allowEmpty option | ||
* Added option to allow generation of empty session | ||
1.1.3 / 2014-08-05 | ||
@@ -3,0 +10,0 @@ ================== |
@@ -36,2 +36,3 @@ /**! | ||
signed: true, | ||
allowEmpty: false, | ||
maxAge: 24 * 60 * 60 * 1000 //one day in ms | ||
@@ -180,3 +181,3 @@ }; | ||
// if new session and not modified, just ignore | ||
if (!this.sessionId && newHash === EMPTY_SESSION_HASH) { | ||
if (!options.allowEmpty && !this.sessionId && newHash === EMPTY_SESSION_HASH) { | ||
return debug('new session and do not modified'); | ||
@@ -183,0 +184,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"repository": "koajs/generic-session", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"keywords": ["koa", "middleware", "session"], | ||
@@ -8,0 +8,0 @@ "author": "dead_horse <dead_horse@qq.com>", |
@@ -69,2 +69,3 @@ generic-session [![Build Status](https://secure.travis-ci.org/koajs/generic-session.svg)](http://travis-ci.org/koajs/generic-session) | ||
* `defer`: defers get session, only generate a session when you use it through `var session = yield this.session;`, defaults to `false` | ||
* `allowEmpty`: allow generation of empty sessions | ||
@@ -71,0 +72,0 @@ * Store can be any Object that has the methods `set`, `get`, `destroy` like [MemoryStore](https://github.com/koajs/koa-session/blob/master/lib/store.js). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40675
1062
118