Sha256: 2696a29aa2baf30b370ae90678fa05c56fae3668e3fea039ce9e2ce11b34f08a
Contents?: true
Size: 443 Bytes
Versions: 12
Compression:
Stored size: 443 Bytes
Contents
module LogStash; module Outputs; class ElasticSearch; module SafeURL PLACEHOLDER = "~hidden~".freeze module_function # Takes a URI object and returns a copy of it with any user or password # information replaced with a placeholder `~hidden~`. def without_credentials(url) url.dup.tap do |u| u.user = PLACEHOLDER if u.user u.password = PLACEHOLDER if u.password end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems