Blocking INVALID_HOST + Bad Request attempts in AWS
I have a Django app running in Elastic Beanstalk. Every day, I am seeing a ton of seemingly malicious attempts to get into my app.
Here are the most common type of events:
Invalid HTTP_HOST header: '52.33.#.#'. You may need to add '52.33.#.#' to ALLOWED_HOSTS.
or
Bad Request: /sitemap.xml (many different URL patterns beyond sitemap.xml)
I saw a post here about deploying WAF rules as a potential solution. I would rather go this route if there is a predefined path. Looking for some collective wisdom on how to block this junk traffic. Thanks.