mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Fix duplicate query parameters in URLs when local=true for /api/v1/videos/{id}
This commit is contained in:
parent
b673695aa2
commit
b90cf286fc
1 changed files with 3 additions and 2 deletions
|
@ -11,11 +11,12 @@ module Invidious::HttpServer
|
||||||
params = url.query_params
|
params = url.query_params
|
||||||
params["host"] = url.host.not_nil! # Should never be nil, in theory
|
params["host"] = url.host.not_nil! # Should never be nil, in theory
|
||||||
params["region"] = region if !region.nil?
|
params["region"] = region if !region.nil?
|
||||||
|
url.query_params = params
|
||||||
|
|
||||||
if absolute
|
if absolute
|
||||||
return "#{HOST_URL}#{url.request_target}?#{params}"
|
return "#{HOST_URL}#{url.request_target}"
|
||||||
else
|
else
|
||||||
return "#{url.request_target}?#{params}"
|
return url.request_target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue