koa-generic-session
Advanced tools
Comparing version 1.11.0 to 1.11.1
1.11.1 / 2016-06-23 | ||
================== | ||
* fix: make sure ctx.session exists when cookie.path = '/' (#91) | ||
1.11.0 / 2016-06-20 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -157,3 +157,7 @@ /**! | ||
let pathname = parse(ctx).pathname; | ||
if (pathname.indexOf(cookie.path || '/') !== 0) { | ||
let cookiePath = cookie.path || '/'; | ||
if (cookiePath === '/') { | ||
return true; | ||
} | ||
if (pathname.indexOf(cookiePath) !== 0) { | ||
debug('cookie path not match'); | ||
@@ -232,3 +236,3 @@ return false; | ||
function *refreshSession (session, originalHash, isNew) { | ||
// reject any session changes, and do not update session expiry | ||
@@ -248,3 +252,3 @@ if(this._sessionSave === false) { | ||
} | ||
// force saving non-empty session | ||
@@ -251,0 +255,0 @@ if(this._sessionSave === true) { |
@@ -5,3 +5,3 @@ { | ||
"repository": "koajs/generic-session", | ||
"version": "1.11.0", | ||
"version": "1.11.1", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "koa", |
Sorry, the diff of this file is not supported yet
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
60644
1582