From f5bf274a530430c075ab625e11e8b2a2ea87c81c Mon Sep 17 00:00:00 2001 From: Fijxu Date: Mon, 23 Feb 2026 19:36:59 -0300 Subject: [PATCH] check if @@secure is already true before changing it's value --- src/invidious/user/cookies.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious/user/cookies.cr b/src/invidious/user/cookies.cr index d022a8ab..ed7665fd 100644 --- a/src/invidious/user/cookies.cr +++ b/src/invidious/user/cookies.cr @@ -14,7 +14,7 @@ struct Invidious::User # Not secure if it's being accessed from I2P # Browsers expect the domain to include https. On I2P there is no HTTPS # Tor browser works fine with secure being true - if domain.try &.split(".").last == "i2p" + if (domain.try &.split(".").last == "i2p") && @@secure @@secure = false end @@ -35,7 +35,7 @@ struct Invidious::User # Not secure if it's being accessed from I2P # Browsers expect the domain to include https. On I2P there is no HTTPS # Tor browser works fine with secure being true - if domain.try &.split(".").last == "i2p" + if (domain.try &.split(".").last == "i2p") && @@secure @@secure = false end