Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
Can we blindly trust Django ERROR "you may need to add xxx to ALLOWED_HOSTS"?

Regularly I receive from my server these kind of errors:

Invalid HTTP_HOST header: '139.162.113.11'. You may need to add '139.162.113.11' to ALLOWED_HOSTS.

The problem is that my server works fine and I don't know where do these IP addresses are coming from.

If I try to localize the one in example, it appears to be in Tokyo, which is weird to me, having a server based in France for mainly european customers.

Can't it be a suspicious attempt to the server security? I'm not keen to allow this IP. What is the correct attitude toward this kind of error?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can "trust" that Django is helping prevent your app from running on disallowed hosts!

However- you can't blindly trust that these IPs should be allowed to host your application. They're typically some kind of bot scanning services poking around for vulnerabilities in servers to do nasty things.

Heck- I have a few of these DISALLOWED_HOST warnings in my inbox this morning as I wake up!

There is a logging option django.security.DisallowedHost where you can quiet this issue- however I keep it on as a barometer for bot activity.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda