mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 06:06:48 -05:00
Merge 2304b5abf0db779caf36c867f9c9bf29401efa7a into 9c62c8b6603d8cecde61a446627a408e7fd57969
This commit is contained in:
commit
074df4b5e8
@ -324,6 +324,25 @@ class Config
|
||||
end
|
||||
end
|
||||
|
||||
# Check if the domain configuration is valid
|
||||
if (domain = config.domain)
|
||||
if parsed_domain = URI.parse(domain)
|
||||
if port = parsed_domain.path.to_i?
|
||||
puts "Config (Hint): Remove the port from your domain: ':#{port}'"
|
||||
exit(1)
|
||||
end
|
||||
if (path_items = parsed_domain.path.split("/")).size > 1
|
||||
path = path_items[1..].join("/")
|
||||
puts "Config (Hint): Remove the path from your domain: '/#{path}'"
|
||||
exit(1)
|
||||
end
|
||||
if scheme = parsed_domain.scheme.presence
|
||||
puts "Config (Hint): Remove the scheme from your domain: '#{scheme}://'"
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return config
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user