When the main app does a request either with bearer of or basic auth and the LHC config does scrub the whole header config.scrubs[:headers] << 'Authorization' then we run into FrozenError (can't modify frozen String: "[FILTERED]").
The problem is that we want to .gsub! a string which was already filtered before and that then causes the error.
This PR fixes that and makes sure to scrub only auth headers which are not already scrubbed.
When the main app does a request either with bearer of or basic auth and the LHC config does scrub the whole header
config.scrubs[:headers] << 'Authorization'
then we run intoFrozenError (can't modify frozen String: "[FILTERED]")
.The problem is that we want to
.gsub!
a string which was already filtered before and that then causes the error.This PR fixes that and makes sure to scrub only auth headers which are not already scrubbed.