From 0b363ff471674da89d04713ff9ebdde2efe7ce12 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 7 Aug 2018 13:14:58 -0500 Subject: [PATCH] Chop leading slash from local URLs --- src/invidious.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 82cdbc2f..6e97c70e 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2566,7 +2566,7 @@ get "/api/manifest/dash/id/:id" do |env| url = url.rchop("") if local - url = URI.parse(url).full_path + url = URI.parse(url).full_path.lchop("/") end "#{url}" @@ -2579,7 +2579,7 @@ get "/api/manifest/dash/id/:id" do |env| if local adaptive_fmts.each do |fmt| - fmt["url"] = URI.parse(fmt["url"]).full_path + fmt["url"] = URI.parse(fmt["url"]).full_path.lchop("/") end end