mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Updated to work when not using a proxy. Fixed errant use of variable name 'uri' to 'url'.
This commit is contained in:
parent
26e8c5d465
commit
1771137d52
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ class LogStash::Outputs::Loggly < LogStash::Outputs::Base
|
|||
config :proxy_user, :validate => :string
|
||||
|
||||
# Proxy Password
|
||||
config :proxy_password, :validate => :password
|
||||
config :proxy_password, :validate => :password, :default => ""
|
||||
|
||||
|
||||
public
|
||||
|
@ -75,7 +75,7 @@ class LogStash::Outputs::Loggly < LogStash::Outputs::Base
|
|||
# Send the event over http.
|
||||
url = URI.parse("#{@proto}://#{@host}/inputs/#{event.sprintf(@key)}")
|
||||
@logger.info("Loggly URL", :url => url)
|
||||
http = Net::HTTP::Proxy(@proxy_host, @proxy_port, @proxy_user, @proxy_password.value).new(uri.host, uri.port)
|
||||
http = Net::HTTP::Proxy(@proxy_host, @proxy_port, @proxy_user, @proxy_password.value).new(url.host, url.port)
|
||||
if url.scheme == 'https'
|
||||
http.use_ssl = true
|
||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue