From 7d5e80929cbf64b128bda58ad8179a746021d02d Mon Sep 17 00:00:00 2001 From: syeopite Date: Tue, 25 Jul 2023 16:27:07 -0700 Subject: [PATCH] Reduce 2faVerified cookie expire time to 5 minutes --- src/invidious/routes/account.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr index d2fd81d7..6091d71c 100644 --- a/src/invidious/routes/account.cr +++ b/src/invidious/routes/account.cr @@ -507,9 +507,9 @@ module Invidious::Routes::Account end if CONFIG.domain - env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", domain: "#{CONFIG.domain}", value: "1", expires: Time.utc + 1.hours, secure: secure, http_only: true, path: "/") + env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", domain: "#{CONFIG.domain}", value: "1", expires: Time.utc + 5.minutes, secure: secure, http_only: true, path: "/") else - env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", value: "1", expires: Time.utc + 1.hours, secure: secure, http_only: true, path: "/") + env.response.cookies["2faVerified"] = HTTP::Cookie.new(name: "2faVerified", value: "1", expires: Time.utc + 5.minutes, secure: secure, http_only: true, path: "/") end end