mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Add workaround for storyboards on priv. instances
An upstream problem with videojs-vtt-thumbnails means that URLs gets joined incorrectly on any instance where `domain`, `external_port` and `https_only` aren't set. This commit adds some logic with the 404 handler to mitigate this problem. This is however only a workaround. See: https://github.com/iv-org/invidious/issues/3117 https://github.com/chrisboustead/videojs-vtt-thumbnails/issues/31
This commit is contained in:
parent
3450896602
commit
a81c0f329c
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,10 @@
|
|||
module Invidious::Routes::ErrorRoutes
|
||||
def self.error_404(env)
|
||||
# Workaround for # 3117
|
||||
if HOST_URL.empty? && env.request.path.starts_with?("/v1/storyboards/sb")
|
||||
return env.redirect "#{env.request.path[15..]}?#{env.params.query}"
|
||||
end
|
||||
|
||||
if md = env.request.path.match(/^\/(?<id>([a-zA-Z0-9_-]{11})|(\w+))$/)
|
||||
item = md["id"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue