From 86627d83034854646d0d5e62c4452342cb11fbd1 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 16 Apr 2018 19:41:38 -0500 Subject: [PATCH] Add options for videoplayback --- src/invidious.cr | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index a4691988..e8df4ecf 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -843,6 +843,11 @@ get "/videoplayback" do |env| end end +options "/videoplayback" do |env| + env.response.headers["Access-Control-Allow-Origin"] = "*" + env.response.headers["Access-Control-Allow-Methods"] = "GET" +end + error 404 do |env| error_message = "404 Page not found" templated "error"