mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-31 04:32:02 +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:
		| @@ -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"] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syeopite
					syeopite