diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-07 13:23:27 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-07 13:23:27 -0500 |
| commit | 9b0c5ffc71974b921197f9613775fcc0dfd6a53d (patch) | |
| tree | 3b9b0de1b121bb1bcb76672d2916fb004e8e0ac3 /src | |
| parent | c1bb75e616dcfef29a92141802854b569c774582 (diff) | |
| download | invidious-9b0c5ffc71974b921197f9613775fcc0dfd6a53d.tar.gz invidious-9b0c5ffc71974b921197f9613775fcc0dfd6a53d.tar.bz2 invidious-9b0c5ffc71974b921197f9613775fcc0dfd6a53d.zip | |
Add CORS headers to /api/manifest/dash/id/videoplayback
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 3 |
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 |
