Django’36935;’21040;Invalid HTTP’u HOST header

Why can’t you stop buying 618?From the technical dimension to explore>>>

When deploying Django, use

python manage.py runserver 0.0.0.0:8080

0.0.0 website

To

invalid http host header:’192.168.2.157:8080’。 You may need to add ‘192.168.2.157’ to allow ‘192.168.2.157:8080’ to be used as a ‘get/blog http:// 1.1’ 400 58424 ‘
invalid http:// host header:’ 192.168.2.157:8080 ‘. You may need to add ‘192.168.2.157’ to allowed hosts.
bad request:// favicon. ICO
[31/DEC/2019 08:49:31] “get/favicon. ICO http:// 1.1” 400 58433

Legal information:

settings.py

ALLOWED_HOSTS = ['192.168.2.157','127.0.0.1']

The value of “*” enables all web addresses to access the Django project. It loses the function of protection and can be used for testing

ALLOWED_HOSTS = ['*']

Similar Posts: