Skip to content

Commit

Permalink
Fix: do not mutate incoming @hosts i-var
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Aug 11, 2021
1 parent ac3b999 commit b5a6912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/logstash/filters/elasticsearch/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def initialize(logger, hosts, options = {})
logger.warn "Supplied proxy setting (proxy => '') has no effect" if @proxy.eql?('')
transport_options[:proxy] = proxy.to_s if proxy && !proxy.eql?('')

hosts.map! {|h| { host: h, scheme: 'https' } } if ssl
hosts = hosts.map { |host| { host: host, scheme: 'https' } } if ssl
# set ca_file even if ssl isn't on, since the host can be an https url
ssl_options = { ssl: true, ca_file: options[:ca_file] } if options[:ca_file]
ssl_options ||= {}
Expand Down

0 comments on commit b5a6912

Please sign in to comment.