Hello Jon,
the documentation describes how to silence this error at https://docs.djangoproject.com/en/2.0/topics/logging/#django-security.
How have you deployed your Django project? I always configure Apache or nginx in such a way so that such invalid requests never reach Django.
Regards,
Antonis
Antonis Christofides http://djangodeployment.com
On 2017-12-18 21:44, Jon Ribbens wrote:
I'm getting spammed with constant "Invalid HTTP_HOST header: '10.9.8.7:443'. You may need to add '10.9.8.7' to ALLOWED_HOSTS" emails, due to the Internet being the Internet. How can I disable these emails, without turning off error emails completely? I don't particularly want to add the IP address to the ALLOWED_HOSTS. It seems to me this email shouldn't be being generated if the HTTP_HOST value is an IP literal.--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0f07d6ca-626c-4887-86e5-a5d10190bc49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment