Commit 760a38d6 authored by mbergeron's avatar mbergeron

Apply feedback using `is_a?(URI::HTTP)`

parent bf2c72ed
......@@ -299,7 +299,7 @@ module EE
# ElasticSearch only exposes a RESTful API, hence we need
# to use the HTTP protocol on all URLs.
unless urls.all? { |url| [:http, :https].include? url.scheme&.to_sym }
unless urls.all? { |uri| uri.is_a?(URI::HTTP) && !uri.host.nil? }
errors.add(:elasticsearch_url, "only supports HTTP(S) URLs.")
end
rescue URI::InvalidURIError => e
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment