mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-12-21 20:56:58 +00:00
Work around cookie max-age bug in Epiphany
This commit is contained in:
parent
9f7b1bbcae
commit
cfa04f4a27
@ -20,8 +20,8 @@ block content
|
||||
p In addition to the legally mandated information, if you wish for future videos uploaded on the same channel(s) to be restricted, please provide the channel URLs, and state: "Future videos uploaded to the same YouTube channels should also be restricted."
|
||||
p When providing URLs, please format them like so:
|
||||
pre.
|
||||
https://youtube.example.com/watch?v=AAAAAAAAAAA
|
||||
https://youtube.example.com/watch?v=BBBBBBBBBBB
|
||||
https://tube.cadence.moe/watch?v=AAAAAAAAAAA
|
||||
https://tube.cadence.moe/watch?v=BBBBBBBBBBB
|
||||
p i.e., one URL per line, with no other information on those lines.
|
||||
section.takedown-contact
|
||||
if constants.takedown && constants.takedown.contact_url
|
||||
@ -30,4 +30,4 @@ block content
|
||||
p: a(href=`mailto:${constants.takedown.contact_email}`) Send email to #{constants.takedown.contact_email}
|
||||
else
|
||||
p You will need to contact the website owner via their domain or hosting provider.
|
||||
p Please allow 5 days for a response.
|
||||
p Please allow 48 hours for a response.
|
||||
|
@ -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…
Reference in New Issue
Block a user