[Django]-Configuring nginx to drop HTTPS requests with no HTTP HOST header

4👍

Thanks to @Richard Smith – change $host to $http_host:

server {
    server_name example.com;
    
    if ($http_host !~* ^(example.com)$ ) {
        return 444;
    }

    # ...
}
👤heds1

Leave a comment