Invidious is an alternative front-end to YouTube
Fix host in redirect
Omar Rotheee973fe86f2
diff --git a/src/invidious.cr b/src/invidious.crindex d375b6aa..a5f5196d 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -4240,10 +4240,11 @@ get "/videoplayback" do |env|if response.headers["Location"]?url = URI.parse(response.headers["Location"])+ host = url.hostenv.response.headers["Access-Control-Allow-Origin"] = "*"url = url.full_path- url += "&host=#{host.lchop("https://")}"+ url += "&host=#{host}"if regionurl += "®ion=#{region}"@@ -4267,10 +4268,11 @@ get "/videoplayback" do |env|if response.headers["Location"]?url = URI.parse(response.headers["Location"])+ host = url.hostenv.response.headers["Access-Control-Allow-Origin"] = "*"url = url.full_path- url += "&host=#{host.lchop("https://")}"+ url += "&host=#{host}"if regionurl += "®ion=#{region}"