0
votes

I am curious, I run the runserver with Django, the first request is what I am working on, but how about the others? I don't provide baidu server, why does someboy request it from my temporary server?

[02/Feb/2018 12:20:05] "GET /stk/?format=json&_=1517542783567 HTTP/1.1" 200 2247 Invalid HTTP_HOST header: '1.164.39.192'. You may need to add u'1.164.39.192' to ALLOWED_HOSTS. [02/Feb/2018 12:50:54] "GET //wp-login.php HTTP/1.1" 400 62538 Invalid HTTP_HOST header: '1.164.39.192'. You may need to add u'1.164.39.192' to ALLOWED_HOSTS. [02/Feb/2018 12:51:20] "GET /wp//wp-login.php HTTP/1.1" 400 62571 Invalid HTTP_HOST header: 'www.baidu.com'. You may need to add u'www.baidu.com' to ALLOWED_HOSTS. [02/Feb/2018 14:15:00] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" 400 62677

1
I think domain "www.baidu.com" is pointed to ip 127.0.0.1 check it in /etc/hosts file. - anjaneyulubatta505

1 Answers

0
votes

if a request comes(like search engine crawlers etc.) with the HTTP host header which is not present in your ALLOWED_HOSTS setting Django create log like yours. Before they hit Django app you can kill these request. For solutions check this