chore: Add website_token into request logs (#8362)
- Log website_token into request logs to identify specific widgets
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user