File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
actionpack/lib/action_dispatch/http
activesupport/lib/active_support Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ module Http
18
18
# env["action_dispatch.parameter_filter"] = [:foo, "bar"]
19
19
# => replaces the value to all keys matching /foo|bar/i with "[FILTERED]"
20
20
#
21
+ # env["action_dispatch.parameter_filter"] = [ /\Apin\z/i, /\Apin_/i ]
22
+ # => replaces the value for the exact (case-insensitive) key 'pin' and all
23
+ # (case-insensitive) keys beginning with 'pin_', with "[FILTERED]"
24
+ # Does not match keys with 'pin' as a substring, such as 'shipping_id'.
25
+ #
21
26
# env["action_dispatch.parameter_filter"] = [ "credit_card.code" ]
22
27
# => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not
23
28
# change { file: { code: "xxxx"} }
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ module ActiveSupport
16
16
# ActiveSupport::ParameterFilter.new([:foo, "bar"])
17
17
# => replaces the value to all keys matching /foo|bar/i with "[FILTERED]"
18
18
#
19
+ # ActiveSupport::ParameterFilter.new([/\Apin\z/i, /\Apin_/i])
20
+ # => replaces the value for the exact (case-insensitive) key 'pin' and all
21
+ # (case-insensitive) keys beginning with 'pin_', with "[FILTERED]".
22
+ # Does not match keys with 'pin' as a substring, such as 'shipping_id'.
23
+ #
19
24
# ActiveSupport::ParameterFilter.new(["credit_card.code"])
20
25
# => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not
21
26
# change { file: { code: "xxxx"} }
You can’t perform that action at this time.
0 commit comments