From 3dd4043827e54becd8a9f5eb1ddcad4f24c1db09 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 3 Jul 2019 13:54:15 -0500 Subject: [PATCH] Fix 404 for video thumbnails --- src/invidious.cr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index b4df40cf..4c190249 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -4705,6 +4705,7 @@ get "/ggpht/*" do |env| env.response.headers["Access-Control-Allow-Origin"] = "*" if response.status_code >= 300 + env.response.headers.delete("Transfer-Encoding") break end @@ -4754,6 +4755,7 @@ get "/sb/:id/:storyboard/:index" do |env| env.response.headers["Access-Control-Allow-Origin"] = "*" if response.status_code >= 300 + env.response.headers.delete("Transfer-Encoding") break end @@ -4798,7 +4800,8 @@ get "/vi/:id/:name" do |env| env.response.headers["Access-Control-Allow-Origin"] = "*" - if response.status_code >= 300 + if response.status_code >= 300 && response.status_code != 404 + env.response.headers.delete("Transfer-Encoding") break end