Answer the question
In order to leave comments, you need to log in
What does the message [Django] ERROR: Invalid HTTP_HOST header... mean?
Set up error logging by mail in the Django project. Now this cart is constantly coming in batches:
[Django] ERROR: Invalid HTTP_HOST header: 'www.somesite.com'. You may need to add u'www.somesite.com' to
ALLOWED_HOSTS What it is?
Answer the question
In order to leave comments, you need to log in
You need to add 'www.somesite.com' to the project settings found in `settings_local.py` or `settings.py` for the ALLOWED_HOSTS parameter.
For example, like this:
Or allow any hosts:
If the sites are left, that is, not yours, then you can put a stub for these messages in the logging settings:
'loggers': {
'django.security.DisallowedHost': {
'handlers': ['null'],
'propagate': False,
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question