From 9cb96de4262ea62cbc851504219c48e4b6e31247 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 15 Jul 2018 21:01:35 -0500 Subject: [PATCH] Add CORS header for /videoplayback redirect --- src/invidious.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/invidious.cr b/src/invidious.cr index 8805a789..766dacce 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1034,6 +1034,7 @@ get "/videoplayback*" do |env| client.get(url, headers) do |response| if response.headers["Location"]? url = URI.parse(response.headers["Location"]) + env.response.headers["Access-Control-Allow-Origin"] = "*" env.redirect url.full_path else env.response.status_code = response.status_code