-
-
Notifications
You must be signed in to change notification settings - Fork 2k
check domain configuration before starting Invidious #5352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
||
# Check if the domain configuration is valid | ||
if (domain = config.domain).nil? || domain.empty? | ||
puts "Config: 'domain' is required/can't be empty" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain
can be empty on local instances.
Co-authored-by: Samantaz Fox <[email protected]>
exit(1) | ||
elsif parsed_domain = URI.parse(domain) | ||
if domain != parsed_domain.domain | ||
puts "Config: 'domain' is invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puts "Config: 'domain' is invalid. | |
puts "Config: 'domain' is invalid." |
end | ||
|
||
# Check if the domain configuration is valid | ||
if (domain = config.domain).nil? || domain.empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way you can use String.presence
instead of a separate nil/empty check
if (domain = config.domain).nil? || domain.empty? | |
if !config.domain.presence |
Closes #5351