Skip to content

Commit

Permalink
Make DASH absolute urls when local (#3554)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamantazFox committed Jan 17, 2023
2 parents a7b2df3 + 910809f commit 0e68756
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invidious/routes/api/manifest.cr
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module Invidious::Routes::API::Manifest

if local
uri = URI.parse(url)
url = "#{uri.request_target}host/#{uri.host}/"
url = "#{HOST_URL}#{uri.request_target}host/#{uri.host}/"
end

"<BaseURL>#{url}</BaseURL>"
Expand All @@ -42,7 +42,7 @@ module Invidious::Routes::API::Manifest

if local
adaptive_fmts.each do |fmt|
fmt["url"] = JSON::Any.new(URI.parse(fmt["url"].as_s).request_target)
fmt["url"] = JSON::Any.new("#{HOST_URL}#{URI.parse(fmt["url"].as_s).request_target}")
end
end

Expand Down

0 comments on commit 0e68756

Please sign in to comment.