mirror of
https://github.com/iv-org/invidious.git
synced 2025-10-24 17:58:30 -05:00
Merge a3363fa9bcdda227e78bef4af4c4789818047484 into 5cfe294063c9317928d8da3387004e3eaddc991a
This commit is contained in:
commit
4a029279a8
@ -332,6 +332,23 @@ class Config
|
|||||||
end
|
end
|
||||||
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 domain != parsed_domain.domain
|
||||||
|
puts "Config: 'domain' is invalid.
|
||||||
|
|
||||||
|
if parsed_domain.host.presence
|
||||||
|
puts "Config: (Hint) Did you mean #{parsed_domain.host} ?"
|
||||||
|
else
|
||||||
|
puts "Config: (Hint) 'domain' should look like this: invidious.example.com"
|
||||||
|
end
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user