Skip to content

Commit

Permalink
Set path on session model in case it doesn't get root initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Jul 22, 2010
1 parent 9cd5ed0 commit 78bfcaf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jsgi/session.js
Expand Up @@ -112,6 +112,7 @@ exports.getSessionModel = function(){
if(!sessionModel){
var Model = require("perstore/model").Model;
sessionModel = Model(exports.sessionSchema);
sessionModel.setPath("Session");
}
return sessionModel;
};
Expand All @@ -121,7 +122,7 @@ exports.setSessionModel = function(value){
exports.sessionSchema = {};

exports.setSessionCookie = function(response, sessionId, expires){
response.headers["set-cookie"] = "pintura-session=" + sessionId + ";HttpOnly;path=/" + (expires ? ";expires=" + expires.toUTCString() : "");
response.headers["set-cookie"] = "pintura-session=" + sessionId + ";path=/" + (expires ? ";expires=" + expires.toUTCString() : "");
};

exports.generateSessionKey = function(username, password){
Expand Down

0 comments on commit 78bfcaf

Please sign in to comment.