Invidious is an alternative front-end to YouTube
Revert "Make head request to resolve short urls"
Brahim Hadricheb40cf6544a5e
diff --git a/src/invidious/routes/api/v1/misc.cr b/src/invidious/routes/api/v1/misc.crindex c6662e32..bad47709 100644--- a/src/invidious/routes/api/v1/misc.cr+++ b/src/invidious/routes/api/v1/misc.cr@@ -159,11 +159,6 @@ module Invidious::Routes::API::V1::Miscreturn error_json(400, "Missing URL to resolve") if !urlbegin- head_response = HTTP::Client.head url.as(String)- if head_response.headers["location"]?- url = head_response.headers["location"]- end-resolved_url = YoutubeAPI.resolve_url(url.as(String))endpoint = resolved_url["endpoint"]pageType = endpoint.dig?("commandMetadata", "webCommandMetadata", "webPageType").try &.as_s || ""