vcrpy icon indicating copy to clipboard operation
vcrpy copied to clipboard

Feature request: add support for `re.compile()` in `filter_*` options

Open lsorber opened this issue 5 years ago • 0 comments
trafficstars

It would be convenient to be able to filter based on regular expressions so we can maintain a list of patterns instead of a list of exceptions. For example:

vcr_config = {
    "filter_headers": ["authorization"],
    "filter_query_parameters": [re.compile("*(secret|password|key|access|code)*")],
}

lsorber avatar Apr 19 '20 10:04 lsorber