From 9b0c5ffc71974b921197f9613775fcc0dfd6a53d Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Tue, 7 Aug 2018 13:23:27 -0500 Subject: [PATCH] Add CORS headers to /api/manifest/dash/id/videoplayback --- src/invidious.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index e57dd5c6..f5aaddbb 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2536,11 +2536,12 @@ get "/api/v1/search" do |env| end get "/api/manifest/dash/id/videoplayback" do |env| + env.response.headers["Access-Control-Allow-Origin"] = "*" env.redirect "/videoplayback?#{env.params.query}" end get "/api/manifest/dash/id/videoplayback/*" do |env| - puts env.request.path + env.response.headers["Access-Control-Allow-Origin"] = "*" env.redirect env.request.path.lchop("/api/manifest/dash/id") end