mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-31 03:51:29 +00:00
replace the old useless HOST_URL by env.request.headers["Host"]
This commit is contained in:
@@ -224,7 +224,7 @@ module Invidious::Routes::API::Manifest
|
||||
if !proxy.empty?
|
||||
"#{proxy}/videoplayback?#{raw_params}"
|
||||
else
|
||||
"#{HOST_URL}/videoplayback?#{raw_params}"
|
||||
"#{env.request.headers["Host"]}/videoplayback?#{raw_params}"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -248,7 +248,7 @@ module Invidious::Routes::API::Manifest
|
||||
manifest = response.body
|
||||
|
||||
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")
|
||||
end
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ module Invidious::Routes::API::V1::Authenticated
|
||||
end
|
||||
|
||||
playlist = create_playlist(title, privacy, user)
|
||||
env.response.headers["Location"] = "#{HOST_URL}/api/v1/auth/playlists/#{playlist.id}"
|
||||
env.response.headers["Location"] = "#{env.request.headers["Host"]}/api/v1/auth/playlists/#{playlist.id}"
|
||||
env.response.status_code = 201
|
||||
{
|
||||
"title" => title,
|
||||
|
||||
Reference in New Issue
Block a user