mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 07:57:07 +00:00
Squash another cookie
This commit is contained in:
@@ -46,10 +46,6 @@ function issue (payload, req, res) {
|
|||||||
if (token) {
|
if (token) {
|
||||||
res.set("X-JWT", token);
|
res.set("X-JWT", token);
|
||||||
const expiry = payload.exp ? (new Date(payload.exp*1000)).toUTCString() : null;
|
const expiry = payload.exp ? (new Date(payload.exp*1000)).toUTCString() : null;
|
||||||
const cookie = expiry
|
|
||||||
? `JWT=${token}; path=/; SameSite=lax; expires=${expiry}`
|
|
||||||
: `JWT=${token}; path=/; SameSite=lax`
|
|
||||||
res.set("Set-Cookie", cookie); // For good measure
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user