Filtering sensitive data with VCR

后端 未结 2 1898
野性不改
野性不改 2021-02-13 04:14

I\'m using VCR gem to record http interactions and replay them in future. I want to filter-out my actual password value in the uri request. Here\'s sample of what the uri look

2条回答
  •  别跟我提以往
    2021-02-13 04:49

    for rails 4+, if you are using secrets.yml you might want to do

    VCR.configure do |config|
      Rails.application.secrets.each do |k,v|
        config.filter_sensitive_data("ENV[#{k}]") { v }
      end
    end
    

    now you're sure not to forget any

提交回复
热议问题