mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-27 17:18:29 +00:00
Merge 143d92af50
into df8839d1f0
This commit is contained in:
commit
5cdd76fdae
@ -319,6 +319,18 @@ class Config
|
||||
end
|
||||
end
|
||||
|
||||
# Check if the domain configuration is valid
|
||||
if (domain = config.domain).nil? || domain.empty?
|
||||
puts "Config: 'domain' is required/can't be empty"
|
||||
exit(1)
|
||||
elsif parsed_domain = URI.parse(domain)
|
||||
if !parsed_domain.scheme.nil?
|
||||
puts "Config: 'domain' cannot contain a scheme (#{parsed_domain.scheme})"
|
||||
puts "Config: (Hint) Set 'domain' to '#{parsed_domain.host}'"
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
return config
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user