diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-08-06 22:42:11 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-08-06 22:42:11 -0500 |
| commit | 3c359df22edd34a9870c9021271f02b2a1fd2618 (patch) | |
| tree | 6aa91b5632ed2ac4a4430d65a8f87ddc28b810cf /src | |
| parent | feed6bc47cebd91f7c99a2fdd015d9299cf95349 (diff) | |
| download | invidious-3c359df22edd34a9870c9021271f02b2a1fd2618.tar.gz invidious-3c359df22edd34a9870c9021271f02b2a1fd2618.tar.bz2 invidious-3c359df22edd34a9870c9021271f02b2a1fd2618.zip | |
Fix routing for '/videoplayback''
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 4 | ||||
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 77e53589..9d2a5924 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2635,13 +2635,13 @@ get "/api/manifest/hls_playlist/*" do |env| manifest end -options "/videoplayback*" do |env| +options "/videoplayback/:wild/*" 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| +get "/videoplayback/:wild/*" do |env| path = env.request.path if path != "/videoplayback" path = path.lchop("/videoplayback/") diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index fcc191f6..a7b202a9 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/:wild/*", "/api/*"] def call(env) return call_next env if exclude_match? env |
