Sha256: 324ba6dc6d7ca5800f3a17a8262d69ab7d6f1f71547d3947946df57344b4f23b
Contents?: true
Size: 466 Bytes
Versions: 16
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true require "oga" module Kiev module RequestBodyFilter class Xml def self.call(request_body, filtered_params, _ignored_params) document = Oga.parse_xml(request_body) filtered_params.each do |param| sensitive_param = document.at_xpath("//#{param}/text()") sensitive_param.text = FILTERED if sensitive_param.respond_to?(:text=) end document.to_xml end end end end
Version data entries
16 entries across 16 versions & 1 rubygems