mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Revert "Make head request to resolve short urls"
This reverts commit 7e267da5be
.
This commit is contained in:
parent
3881038a32
commit
b40cf6544a
1 changed files with 0 additions and 5 deletions
|
@ -159,11 +159,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 || ""
|
||||
|
|
Loading…
Reference in a new issue