Skip to content

Commit

Permalink
append basePath on setCookie
Browse files Browse the repository at this point in the history
  • Loading branch information
intribvadell committed Feb 13, 2020
1 parent 3f585c9 commit 40711a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/swsInterface.js
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ function processAuth(req,res,useWWWAuth) {
// renew it
//sessionIDs[sessionIdCookie] = Date.now();
storeSessionID(sessionIdCookie);
cookies.set('sws-session-id',sessionIdCookie,{path:swsSettings.uriPath,maxAge:swsSettings.sessionMaxAge*1000});
cookies.set('sws-session-id',sessionIdCookie,{path:swsSettings.basePath+swsSettings.uriPath,maxAge:swsSettings.sessionMaxAge*1000});
// Ok
req['sws-auth'] = true;
return resolve(true);
@@ -129,7 +129,7 @@ function processAuth(req,res,useWWWAuth) {
var sessid = uuidv1();
storeSessionID(sessid);
// Set session cookie with expiration in 15 min
cookies.set('sws-session-id',sessid,{path:swsSettings.uriPath,maxAge:swsSettings.sessionMaxAge*1000});
cookies.set('sws-session-id',sessid,{path:swsSettings.basePath+swsSettings.uriPath,maxAge:swsSettings.sessionMaxAge*1000});
}

req['sws-auth'] = true;

0 comments on commit 40711a3

Please sign in to comment.