From 8d7ca9a4e282f48f0225ca95157242dc09897003 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Mon, 14 Oct 2024 17:57:52 -0300 Subject: [PATCH] External Proxies: Proxyfi HLS Playlists --- src/invidious/routes/api/manifest.cr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/invidious/routes/api/manifest.cr b/src/invidious/routes/api/manifest.cr index f1fa4124..c6906346 100644 --- a/src/invidious/routes/api/manifest.cr +++ b/src/invidious/routes/api/manifest.cr @@ -210,7 +210,13 @@ module Invidious::Routes::API::Manifest raw_params["host"] = uri.host.not_nil! - "#{HOST_URL}/videoplayback?#{raw_params}" + proxy = Invidious::HttpServer::Utils.get_external_proxy + + if !proxy.empty? + "#{proxy}/videoplayback?#{raw_params}" + else + "#{HOST_URL}/videoplayback?#{raw_params}" + end end end