Add django.middleware.common.BrokenLinkEmailsMiddleware

https://docs.djangoproject.com/en/2.2/howto/error-reporting/#errors

> If those conditions are met, Django will email the users listed in the
> MANAGERS setting whenever your code raises a 404 and the request has a
> referer. It doesn’t bother to email for 404s that don’t have a referer –
> those are usually just people typing in broken URLs or broken Web bots.
> It also ignores 404s when the referer is equal to the requested URL,
> since this behavior is from broken Web bots too.
This commit is contained in:
Dani Hodovic 2019-12-10 12:46:52 +01:00
parent 4259af3fd8
commit 1dd8608142
No known key found for this signature in database
GPG Key ID: 15433E10A71D1221

View File

@ -140,6 +140,7 @@ MIDDLEWARE = [
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.common.BrokenLinkEmailsMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]