proxify HLS by its host header
All checks were successful
Invidious CI / build (push) Successful in 5m0s
All checks were successful
Invidious CI / build (push) Successful in 5m0s
This commit is contained in:
parent
b1278a4853
commit
336b590ea2
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ module Invidious::Routes::API::Manifest
|
||||||
if !proxy.empty?
|
if !proxy.empty?
|
||||||
"#{proxy}/videoplayback?#{raw_params}"
|
"#{proxy}/videoplayback?#{raw_params}"
|
||||||
else
|
else
|
||||||
"#{HOST_URL}/videoplayback?#{raw_params}"
|
"#{env.request.headers["Host"]}/videoplayback?#{raw_params}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -248,7 +248,7 @@ module Invidious::Routes::API::Manifest
|
||||||
manifest = response.body
|
manifest = response.body
|
||||||
|
|
||||||
if local
|
if local
|
||||||
manifest = manifest.gsub("https://www.youtube.com", HOST_URL)
|
manifest = manifest.gsub("https://www.youtube.com", env.request.headers["Host"])
|
||||||
manifest = manifest.gsub("index.m3u8", "index.m3u8?local=true")
|
manifest = manifest.gsub("index.m3u8", "index.m3u8?local=true")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue