Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Commit

Permalink
Add verify_ssl option; merge @cclien change
Browse files Browse the repository at this point in the history
  • Loading branch information
toshitanian committed Oct 6, 2016
2 parents 2d3c255 + dc2aa4b commit 8c97045
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ A generic [fluentd][1] output plugin for sending logs to an HTTP endpoint
username alice # default: ''
password bobpop # default: '', secret: true
use_ssl true # default: false
verify_ssl false # default: true
<headers>
HeaderExample1 header1
HeaderExample2 header2
Expand Down
4 changes: 4 additions & 0 deletions lib/fluent/plugin/out_http_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def initialize

config_param :open_timeout, :integer, :default => nil
config_param :read_timeout, :integer, :default => 60
config_param :verify_ssl, :bool, :default => true

# Simple rate limiting: ignore any records within `rate_limit_msec`
# since the last one.
Expand Down Expand Up @@ -208,6 +209,9 @@ def send_request(req, uri)
if @use_ssl
client.use_ssl = true
client.ca_file = OpenSSL::X509::DEFAULT_CERT_FILE
unless @verify_ssl
client.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
end
res = client.start {|http|
http.open_timeout = @open_timeout
Expand Down

0 comments on commit 8c97045

Please sign in to comment.