~cadence/cloudtube

cfa04f4a271ce633dbda7a465df4164765993ae9 — Cadence Ember 8 months ago 9f7b1bb
Work around cookie max-age bug in Epiphany
2 files changed, 4 insertions(+), 4 deletions(-)

M pug/takedown.pug
M utils/getuser.js
M pug/takedown.pug => pug/takedown.pug +3 -3
@@ 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.

M utils/getuser.js => utils/getuser.js +1 -1
@@ 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}
}