Open soffes opened 8 years ago
@soffes I'd be interested in implementing this functionality, can you elaborate upon what you're looking to have redacted?
I have a PR in my fork of this that adds this functionality, based on VCR.py. https://github.com/tjprescott/DVR/pull/5
It allows you to specify header, query or post body filters (though I haven't implemented POST body) which can be of three types:
.remove
- removes the key/value pair from the interaction.replace(String)
- replaces the value with the specified one (useful for putting "redacted").closure((String, String) -> (String?))
- runs a closure that takes in the key/value pair and either returns the new value or nil
to omit.
I know VCR does this. We should copy them. Manually redacting cassettes is pretty tedious.