Skip to content

Commit

Permalink
properly handle ports when using ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvd committed Jul 28, 2015
1 parent 02f7755 commit 130ee3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/logstash/inputs/elasticsearch.rb
Expand Up @@ -127,7 +127,10 @@ def register
end

hosts = if @ssl then
@hosts.map { |h| { :host => h, :scheme => 'https' } }
@hosts.map do |h|
host, port = h.split(":")
{ :host => host, :scheme => 'https', :port => port }
end
else
@hosts
end
Expand Down

0 comments on commit 130ee3b

Please sign in to comment.