Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

258
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!