From 3fb80b873eada403f05440fd32ee9fdcf7a5e8e5 Mon Sep 17 00:00:00 2001 From: okkez Date: Fri, 20 Nov 2015 10:06:27 +0900 Subject: [PATCH 1/2] Add descriptions to in_http See http://docs.fluentd.org/articles/in_http I cannot describe some options: * backlog * blocking_timeout * cors_allow_origins --- lib/fluent/plugin/in_http.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/fluent/plugin/in_http.rb b/lib/fluent/plugin/in_http.rb index 17212b4f89..cf7fff76b4 100644 --- a/lib/fluent/plugin/in_http.rb +++ b/lib/fluent/plugin/in_http.rb @@ -30,16 +30,24 @@ def initialize EMPTY_GIF_IMAGE = "GIF89a\u0001\u0000\u0001\u0000\x80\xFF\u0000\xFF\xFF\xFF\u0000\u0000\u0000,\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000\u0000\u0002\u0002D\u0001\u0000;".force_encoding("UTF-8") + desc 'The port to listen to.' config_param :port, :integer, :default => 9880 + desc 'The bind address to listen to.' config_param :bind, :string, :default => '0.0.0.0' + desc 'The size limit of the POSTed element. Default is 32MB.' config_param :body_size_limit, :size, :default => 32*1024*1024 # TODO default + desc 'The timeout limit for keeping the connection alive.' config_param :keepalive_timeout, :time, :default => 10 # TODO default config_param :backlog, :integer, :default => nil + desc 'Add HTTP_ prefix headers to the record.' config_param :add_http_headers, :bool, :default => false + desc 'Add REMOTE_ADDR header to the record.' config_param :add_remote_addr, :bool, :default => false + desc 'The format of the HTTP body.' config_param :format, :string, :default => 'default' config_param :blocking_timeout, :time, :default => 0.5 config_param :cors_allow_origins, :array, :default => nil + desc 'Respond with empty gif image of 1x1 pixel.' config_param :respond_with_empty_img, :bool, :default => false def configure(conf) From 373be2b6f0914c245cde96332c17734fb8733ae5 Mon Sep 17 00:00:00 2001 From: okkez Date: Thu, 3 Dec 2015 06:51:49 +0900 Subject: [PATCH 2/2] Add description for cors_allow_origins See #473 --- lib/fluent/plugin/in_http.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fluent/plugin/in_http.rb b/lib/fluent/plugin/in_http.rb index cf7fff76b4..7a29e2aab5 100644 --- a/lib/fluent/plugin/in_http.rb +++ b/lib/fluent/plugin/in_http.rb @@ -46,6 +46,7 @@ def initialize desc 'The format of the HTTP body.' config_param :format, :string, :default => 'default' config_param :blocking_timeout, :time, :default => 0.5 + desc 'Set a white list of domains that can do CORS (Cross-Origin Resource Sharing)' config_param :cors_allow_origins, :array, :default => nil desc 'Respond with empty gif image of 1x1 pixel.' config_param :respond_with_empty_img, :bool, :default => false