diff --git a/src/invidious.cr b/src/invidious.cr index 6e97c70ea..e57dd5c6c 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2689,6 +2689,18 @@ options "/videoplayback/*" do |env| env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, range" end +options "/api/manifest/dash/id/videoplayback" do |env| + env.response.headers["Access-Control-Allow-Origin"] = "*" + env.response.headers["Access-Control-Allow-Methods"] = "GET" + env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, range" +end + +options "/api/manifest/dash/id/videoplayback/*" do |env| + env.response.headers["Access-Control-Allow-Origin"] = "*" + env.response.headers["Access-Control-Allow-Methods"] = "GET" + env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, range" +end + get "/videoplayback/*" do |env| path = env.request.path diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index 874927e52..fcc191f67 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -17,7 +17,7 @@ class Config end class FilteredCompressHandler < Kemal::Handler - exclude ["/videoplayback/*", "/api/*"] + exclude ["/videoplayback", "/api/*"] def call(env) return call_next env if exclude_match? env