docs: fix regex pattern in logger.md examples (#1378)

This commit is contained in:
Yuki Hirasawa 2022-01-11 23:26:06 +09:00 committed by GitHub
parent 295f112356
commit 026e9569a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ You can filter sensitive information from Faraday logs using a regex matcher:
```ruby ```ruby
conn = Faraday.new(url: 'http://sushi.com') do |faraday| conn = Faraday.new(url: 'http://sushi.com') do |faraday|
faraday.response :logger do | logger | faraday.response :logger do | logger |
logger.filter(/(api_key=)(\w+)/, '\1[REMOVED]') logger.filter(/(api_key=)([^&]+)/, '\1[REMOVED]')
end end
end end