chore: Add website_token into request logs (#8362)

- Log website_token into request logs to identify specific widgets
This commit is contained in:
Sojan Jose
2023-11-15 20:32:21 -08:00
committed by GitHub
parent a023eabf59
commit 5f6e974531

View File

@@ -2,5 +2,11 @@
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [
:password, :secret, :token, :_key, :auth, :crypt, :salt, :certificate, :otp, :access, :private, :protected, :ssn
:password, :secret, :_key, :auth, :crypt, :salt, :certificate, :otp, :access, :private, :protected, :ssn
]
# Regex to filter all occurrences of 'token' in keys except for 'website_token'
filter_regex = /\A(?!.*\bwebsite_token\b).*token/i
# Apply the regex for filtering
Rails.application.config.filter_parameters += [filter_regex]