Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django error report emails - customize settings parameters

I noticed that the Django error report mails includes the settings parameters of my project, including some sensitive keys and secret numbers.

What is the best way of dropping/customizing some of the Django SETTINGS parameters out of the error report emails?

like image 786
arnon cohen Avatar asked Dec 28 '25 10:12

arnon cohen


1 Answers

Any setting with a name that contains API, TOKEN, KEY, SECRET, PASS or SIGNATURE will automatically be 'cleansed' (replaced with stars) in error mails. The easiest way to hide your own sensitive keys would probably be just renaming them.

The Django documentation has some additional things you could do to obfuscate other sensitive data that can appear in error mails, like POST variables or traceback information.

like image 175
Wander Nauta Avatar answered Dec 31 '25 01:12

Wander Nauta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!