About Sensitive Variables and Error Reporting
In production mode (DEBUG = False
), you can hide certain variables from logging in error reports with the decorators @sensitive_variables
and @sensitive_post_parameters
, as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Variables in Django settings and request.META
containing any of the case-insensitive words "API", "TOKEN", "KEY", "SECRET", "PASS", "SIGNATURE" in their names will be hidden from reports too.
The values of hidden variables will be shown as **********
.
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You