mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Fix routing for '/videoplayback''
This commit is contained in:
parent
feed6bc47c
commit
3c359df22e
2 changed files with 3 additions and 3 deletions
|
@ -2635,13 +2635,13 @@ get "/api/manifest/hls_playlist/*" do |env|
|
||||||
manifest
|
manifest
|
||||||
end
|
end
|
||||||
|
|
||||||
options "/videoplayback*" do |env|
|
options "/videoplayback/:wild/*" do |env|
|
||||||
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
||||||
env.response.headers["Access-Control-Allow-Methods"] = "GET"
|
env.response.headers["Access-Control-Allow-Methods"] = "GET"
|
||||||
env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, range"
|
env.response.headers["Access-Control-Allow-Headers"] = "Content-Type, range"
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/videoplayback*" do |env|
|
get "/videoplayback/:wild/*" do |env|
|
||||||
path = env.request.path
|
path = env.request.path
|
||||||
if path != "/videoplayback"
|
if path != "/videoplayback"
|
||||||
path = path.lchop("/videoplayback/")
|
path = path.lchop("/videoplayback/")
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Config
|
||||||
end
|
end
|
||||||
|
|
||||||
class FilteredCompressHandler < Kemal::Handler
|
class FilteredCompressHandler < Kemal::Handler
|
||||||
exclude ["/videoplayback", "/api/*"]
|
exclude ["/videoplayback/:wild/*", "/api/*"]
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
return call_next env if exclude_match? env
|
return call_next env if exclude_match? env
|
||||||
|
|
Loading…
Reference in a new issue