Put only domain names in allowed hosts On Tue, Nov 22, 2022, 06:22 Mike Dewhirst <mi...@dewhirst.com.au> wrote:
> My Django log is full of these errors ... > > ERROR > /usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py > TIME: 2022-09-28 00:13:17,204 MSG: exception.py:response_for_exception:99 > Invalid HTTP_HOST header: '111.222.333.444'. You may need to add > '111.222.333.444' to ALLOWED_HOSTS. > > ... where '111.222.333.444. is the correct IP address of the FQDN for the > site. > > Everything seems to be working but these errors are just consuming disk > space. > > My reading of the docs > https://docs.djangoproject.com/en/3.2/ref/settings/#allowed-hosts does > not indicate the IP address should be in ALLOWED_HOSTS. > > My inclination is it shouldn't be there. > > What is the correct way to deal with this? > > Many thanks > > Mike > > -- > Signed email is an absolute defence against phishing. This email has > been signed with my private key. If you import my public key you can > automatically decrypt my signature and be sure it came from me. Just > ask and I'll send it to you. Your email software can handle signing. > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/053ab6dc-21c0-7914-1638-435838ace9ed%40dewhirst.com.au > <https://groups.google.com/d/msgid/django-users/053ab6dc-21c0-7914-1638-435838ace9ed%40dewhirst.com.au?utm_medium=email&utm_source=footer> > . > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF7qQgBPyX3vM%2Bt_AKGruABhybCq3LnbXxSRZs%2BnV-KupzSH9Q%40mail.gmail.com.