Revert "Make head request to resolve short urls"

This reverts commit 7e267da5beef5981b6db40e7b20f23f5dbd81136.
This commit is contained in:
Brahim Hadriche 2023-11-19 16:06:29 -05:00 committed by ModZero
parent 10a9565b09
commit 7281da0fac

View File

@ -175,11 +175,6 @@ module Invidious::Routes::API::V1::Misc
return error_json(400, "Missing URL to resolve") if !url
begin
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 || ""