From f602e857eb57c472fc5aa660c2ce8b433c1d6246 Mon Sep 17 00:00:00 2001 From: TeamMasse Date: Thu, 30 Jan 2025 22:02:15 +0100 Subject: [PATCH] do it --- src/invidious/routes/errors.cr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/invidious/routes/errors.cr b/src/invidious/routes/errors.cr index 1e9ab44e..0dd99716 100644 --- a/src/invidious/routes/errors.cr +++ b/src/invidious/routes/errors.cr @@ -15,10 +15,10 @@ module Invidious::Routes::ErrorRoutes response = YT_POOL.client &.get(URI.parse(response.headers["Location"]).request_target) end - if response.body.empty? - env.response.headers["Location"] = "/" - haltf env, status_code: 302 - end + #if response.body.empty? + # env.response.headers["Location"] = "/" + # haltf env, status_code: 302 + #end html = XML.parse_html(response.body) ucid = html.xpath_node(%q(//link[@rel="canonical"])).try &.["href"].split("/")[-1]