15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/rollbar/scrubbers/url.rb', line 15
def call(options = {})
url = ascii_encode(options[:url])
filter(url,
build_regex(options[:scrub_fields]),
options[:scrub_user],
options[:scrub_password],
options.fetch(:randomize_scrub_length, true),
options[:scrub_fields].include?(SCRUB_ALL),
build_whitelist_regex(options[:whitelist] || []))
rescue StandardError => e
message = '[Rollbar] There was an error scrubbing the url: ' \
"#{e}, options: #{options.inspect}"
Rollbar.logger.error(message)
url
end
|