Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not send invalid HTTP_HOST errors when ALLOWED_HOSTS doesn't have …
…the hostname (can be forged and generates a lot of log messages)
  • Loading branch information
proycon committed Jan 16, 2016
1 parent 8740955 commit b8044e2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions webfowlt/settings.py
Expand Up @@ -137,3 +137,22 @@
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)


#Do not send invalid HTTP_HOST errors when ALLOWED_HOSTS doesn't have the hostname (can be forged and generates a lot of log messages)
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'null': {
'class': 'django.utils.log.NullHandler',
},
},
'loggers': {
'django.security.DisallowedHost': {
'handlers': ['null'],
'propagate': False,
},
}
}

0 comments on commit b8044e2

Please sign in to comment.