summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrahim Hadriche <brahim.hadriche@gmail.com>2023-11-19 16:06:29 -0500
committerBrahim Hadriche <brahim.hadriche@gmail.com>2023-11-19 16:06:29 -0500
commitb40cf6544a5e801c387b988f1be4d632fd50db90 (patch)
treeded0915b738df829efea79b2332d1266d16fab6d
parent3881038a32cde54bb31523adb4bbc8fd5b3d759a (diff)
downloadinvidious-b40cf6544a5e801c387b988f1be4d632fd50db90.tar.gz
invidious-b40cf6544a5e801c387b988f1be4d632fd50db90.tar.bz2
invidious-b40cf6544a5e801c387b988f1be4d632fd50db90.zip
Revert "Make head request to resolve short urls"
This reverts commit 7e267da5beef5981b6db40e7b20f23f5dbd81136.
-rw-r--r--src/invidious/routes/api/v1/misc.cr5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/invidious/routes/api/v1/misc.cr b/src/invidious/routes/api/v1/misc.cr
index 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::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 || ""