In our Production, we use Django’s automated method to get email notifications on exceptions.
This works great with one problem, the whole POST data gets emailed to all developers.
Some of the POST fields can be sensitive user data (password or worse – credit card).
Is there a way to tell Django what fields to filter ?
I was thinking of creating a middleware that clear request.POST of certain fields on exceptions, alas it appears I can’t change request.POST.
Any ideas ?
About modifying the
POSTdictionary (within your middleware), you can do the following: