0

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?

4

1 回答 1

1

您可以使用 VCR 的before_recordbefore_playback挂钩以尽可能多的灵活性实现自己的自定义过滤。例如,您可以看到VCR 本身是如何根据这些钩子实现filter_sensitive_data的。

于 2013-10-18T05:32:34.427 回答