mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-03-02 02:31:35 +00:00
Work around cookie max-age bug in Epiphany
This commit is contained in:
parent
9f7b1bbcae
commit
cfa04f4a27
2 changed files with 4 additions and 4 deletions
|
|
@ -24,7 +24,7 @@ function getToken(req, responseHeaders) {
|
|||
function setToken(responseHeaders, token) {
|
||||
const setCookie = responseHeaders["set-cookie"] || []
|
||||
if (!token) token = crypto.randomBytes(18).toString("base64").replace(/\W/g, "_")
|
||||
setCookie.push(`token=${token}; Path=/; Max-Age=2147483648; HttpOnly; SameSite=Lax`)
|
||||
setCookie.push(`token=${token}; Path=/; Max-Age=2147483647; HttpOnly; SameSite=Lax`)
|
||||
responseHeaders["set-cookie"] = setCookie
|
||||
return {token, responseHeaders}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue