Skip to content

Commit

Permalink
Merge pull request #422 from internetee/registry-314
Browse files Browse the repository at this point in the history
Registry 314
  • Loading branch information
teadur authored Mar 14, 2017
2 parents d4696cb + e70c84b commit 8216cfa
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Be sure to restart your server when you modify this file.

# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]

Rails.application.config.filter_parameters << lambda do |key, value|
value.to_s.gsub!(/pw>.+<\//, 'pw>[FILTERED]</') if key =~ /^(frame|raw_frame)$/i
Rails.application.configure do
config.filter_parameters += [:password, /^frame$/, /^nokogiri_frame$/, /^parsed_frame$/]
config.filter_parameters << lambda do |key, value|
if key == 'raw_frame'
value.to_s.gsub!(/pw>.+<\//, 'pw>[FILTERED]</')
value.to_s.gsub!(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/,
"<eis:legalDocument>[FILTERED]</eis:legalDocument>")
end
end
end

0 comments on commit 8216cfa

Please sign in to comment.