0

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

Rakesh
  • 81,458
  • 17
  • 76
  • 113

1 Answers1

0

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

Selim Yılmaz
  • 596
  • 8
  • 11