I have a problem with a "Bad Request 400" (the production server) when I have set debug = false. I use cookiecutter and Django 1.8.
I set ALLOWED_HOSTS = ['*']
- without any result.
In the logs I have a message:
Invalid HTTP_HOST header: 'myaddress.here'. You may need to add 'myaddress.here' to ALLOWED_HOSTS.
I tried the code that is placed in the documentation django, also without success:
'handlers': {
'null': {
'class': 'logging.NullHandler',
},
},
'loggers': {
'django.security.DisallowedHost': {
'handlers': ['null'],
'propagate': False,
},
},