mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-29 11:01:24 +00:00
deprecate support for external video playback proxy
This commit is contained in:
@@ -222,19 +222,13 @@ module Invidious::Routes::API::Manifest
|
||||
|
||||
raw_params["host"] = uri.host.not_nil!
|
||||
|
||||
proxy = Invidious::HttpServer::Utils.get_external_proxy
|
||||
|
||||
if CONFIG.https_only
|
||||
scheme = "https://"
|
||||
else
|
||||
scheme = "http://"
|
||||
end
|
||||
|
||||
if !proxy.empty?
|
||||
"#{proxy}/videoplayback?#{raw_params}"
|
||||
else
|
||||
"#{scheme}#{env.request.headers["Host"]}/videoplayback?#{raw_params}"
|
||||
end
|
||||
"#{scheme}#{env.request.headers["Host"]}/videoplayback?#{raw_params}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -54,13 +54,6 @@ module Invidious::Routes::BeforeAll
|
||||
extra_media_csp, extra_connect_csp = BackendInfo.get_csp(env.get("current_companion").as(Int32))
|
||||
end
|
||||
|
||||
if !CONFIG.external_videoplayback_proxy.empty?
|
||||
CONFIG.external_videoplayback_proxy.each do |proxy|
|
||||
extra_media_csp += " #{proxy}"
|
||||
extra_connect_csp += " #{proxy}"
|
||||
end
|
||||
end
|
||||
|
||||
# Allow media resources to be loaded from google servers
|
||||
# TODO: check if *.youtube.com can be removed
|
||||
if CONFIG.disabled?("local") || !preferences.local
|
||||
|
||||
@@ -313,16 +313,7 @@ module Invidious::Routes::VideoPlayback
|
||||
end
|
||||
|
||||
if local
|
||||
external_proxy = Invidious::HttpServer::Utils.get_external_proxy
|
||||
if !external_proxy.empty?
|
||||
url = URI.parse(url)
|
||||
external_proxy = URI.parse(external_proxy)
|
||||
url.host = external_proxy.host
|
||||
url.port = external_proxy.port
|
||||
url = url.to_s
|
||||
else
|
||||
url = URI.parse(url).request_target.not_nil!
|
||||
end
|
||||
url = URI.parse(url).request_target.not_nil!
|
||||
url += "&title=#{URI.encode_www_form(title, space_to_plus: false)}" if title
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user