Reputation: 343
I'm using VCR to filter the username and password of a client in a project I'm developing right now, but for some dumb reason, the client used the website's domain as the password.
(for example, say I'm trying to log into www.fakewebsite.com, the client set their password to "fakewebsite." So in the VCR recording, whenever "www.fakewebsite.com" is displayed, it ends up showing "www..COM." Other than getting the client to change their password, is there a way to filter just when the password is being used and not when it's in a url, or other parts of the recording?
Upvotes: 0
Views: 598
Reputation: 21810
You can implement your own custom filtering with as much flexibility as you want using VCR's before_record and before_playback hooks. For an example, you can see how VCR itself implements filter_sensitive_data
in terms of these hooks.
Upvotes: 1