Currently scrubbing for request cookies is centralized in the EventScrubber, and assumes that it's a dictionary (as most frameworks convert the cookies to dictionaries as part of handling the request).
In order to make it easier for us to apply both the granular filtering that's done on dictionaries when the dataCollection config is provided - and to handle the fallback of a string being provided in which case we replace the whole thing with [Filtered] - we should create a small helper function to handle both cases and use it within the EventScrubber .
Currently scrubbing for request cookies is centralized in the
EventScrubber, and assumes that it's a dictionary (as most frameworks convert the cookies to dictionaries as part of handling the request).In order to make it easier for us to apply both the granular filtering that's done on dictionaries when the
dataCollectionconfig is provided - and to handle the fallback of a string being provided in which case we replace the whole thing with[Filtered]- we should create a small helper function to handle both cases and use it within theEventScrubber.