Skip to content

Commit

Permalink
trying to cut the cookie node issue
Browse files Browse the repository at this point in the history
  • Loading branch information
suculent committed Nov 19, 2023
1 parent bbbe71e commit 2d2c6b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/router.auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,13 @@ module.exports = function (app) {
}

req.session.cookie.maxAge = maxAge;
res.cookie("x-thx-core", maxAge, {

// Which one is it?
// Set-Cookie: x-thx-core=1209600000; Max-Age=1209600; Domain=.thinx.cloud; Path=/; Expires=Sun, 03 Dec 2023 13:24:00 GMT; HttpOnly
// Set-Cookie: x-thx-core=s%3AubrjzYSeAG-GTmhTaEmLOWHlQpUnUmaF.ZYYBEzLo3bWPOhwaHqIwlOUV8XcW8U%2FimX2Gd6u9NQQ; Domain=.thinx.cloud; Path=/; Expires=Sun, 03 Dec 2023 13:24:00 GMT; HttpOnly

// This seems to create invalid session cookie
res.cookie("x-thx-ignored", maxAge, {
maxAge: maxAge,
httpOnly: true,
secure: false,
Expand Down
2 changes: 1 addition & 1 deletion thinx-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ module.exports = class THiNX extends EventEmitter {
httpOnly: true,
domain: short_domain
},
name: "x-thx-core",
name: "x-thx-wscore",
resave: true,
rolling: true,
saveUninitialized: true
Expand Down

0 comments on commit 2d2c6b0

Please sign in to comment.