About Denying All Unintended Domain Requests
When you set a Django website with Nginx, hackers may try to do requests to the server using the IP address or via their domains temporarily pointing to your server's IP address. To avoid Django error reporting about domain not being in ALLOWED_HOSTS
and to block their requests completely, add the default_server
settings to your Nginx server configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Tips and Tricks Dev Ops Security Logging Django 3.2 Django 2.2 Django 1.11 Django 1.8 nginx Sentry SSL
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.