Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic redacting #39

Open
soffes opened this issue Dec 17, 2015 · 2 comments
Open

Automatic redacting #39

soffes opened this issue Dec 17, 2015 · 2 comments

Comments

@soffes
Copy link
Contributor

soffes commented Dec 17, 2015

I know VCR does this. We should copy them. Manually redacting cassettes is pretty tedious.

@Travmatth
Copy link

@soffes I'd be interested in implementing this functionality, can you elaborate upon what you're looking to have redacted?

@tjprescott
Copy link

I have a PR in my fork of this that adds this functionality, based on VCR.py.
tjprescott#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants