summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-08-07 13:23:27 -0500
committerOmar Roth <omarroth@hotmail.com>2018-08-07 13:23:27 -0500
commit9b0c5ffc71974b921197f9613775fcc0dfd6a53d (patch)
tree3b9b0de1b121bb1bcb76672d2916fb004e8e0ac3
parentc1bb75e616dcfef29a92141802854b569c774582 (diff)
downloadinvidious-9b0c5ffc71974b921197f9613775fcc0dfd6a53d.tar.gz
invidious-9b0c5ffc71974b921197f9613775fcc0dfd6a53d.tar.bz2
invidious-9b0c5ffc71974b921197f9613775fcc0dfd6a53d.zip
Add CORS headers to /api/manifest/dash/id/videoplayback
-rw-r--r--src/invidious.cr3
1 files changed, 2 insertions, 1 deletions
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