Method: Fluent::Plugin::ElasticsearchInput#get_escaped_userinfo
- Defined in:
- lib/fluent/plugin/in_elasticsearch.rb
#get_escaped_userinfo(host_str) ⇒ Object
115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/fluent/plugin/in_elasticsearch.rb', line 115 def get_escaped_userinfo(host_str) if m = host_str.match(/(?<scheme>.*)%{(?<user>.*)}:%{(?<password>.*)}(?<path>@.*)/) m["scheme"] + URI.encode_www_form_component(m["user"]) + ':' + URI.encode_www_form_component(m["password"]) + m["path"] else host_str end end |