We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7a93fc commit 91c0ae4Copy full SHA for 91c0ae4
src/invidious/routes/video_playback.cr
@@ -164,11 +164,13 @@ module Invidious::Routes::VideoPlayback
164
env.response.headers["Access-Control-Allow-Origin"] = "*"
165
166
if location = resp.headers["Location"]?
167
- location = URI.parse(location)
168
- location = "#{location.request_target}&host=#{location.host}#{region ? "®ion=#{region}" : ""}"
+ url = Invidious::HttpServer::Utils.proxy_video_url(location, region: region)
169
170
- env.redirect location
171
- break
+ if title = query_params["title"]?
+ url = "#{url}&title=#{URI.encode_www_form(title)}"
+ end
172
+
173
+ return env.redirect url
174
end
175
176
if title = query_params["title"]?
0 commit comments