Skip to content
Snippets Groups Projects
Verified Commit d7d9e0ca authored by Nik | Klampfradler's avatar Nik | Klampfradler Committed by Jonathan Weth
Browse files

Make logging of ALLOWED_HOSTS violations configurable

(cherry picked from commit 15f71d3e)
parent cc9e1584
No related branches found
No related tags found
1 merge request!733Prepare release 2.0rc6
......@@ -793,14 +793,15 @@ LOGGING = {
},
"formatters": {"verbose": {"format": "%(levelname)s %(asctime)s %(module)s: %(message)s"}},
"root": {"handlers": ["console"], "level": _settings.get("logging.level", "WARNING"),},
"loggers": {
"django.security.DisallowedHost": {
"handlers": ["null"],
"propagate": False,
},
},
"loggers": {},
}
if not _settings.get("logging.disallowed_host", False):
LOGGING["loggers"]["django.security.DisallowedHost"] = {
"handlers": ["null"],
"propagate": False,
}
# Rules and permissions
GUARDIAN_RAISE_403 = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment