Production-settings ((exclusive)) File
Ensure your production database has connection pooling enabled. Unlike a local dev DB, a production DB needs to handle hundreds of concurrent requests without crashing. 3. Monitoring and Observability
Set to nosniff to block browsers from MIME-sniffing a response away from the declared content-type. Network Segmentation and Firewalls production-settings
A development database is usually small, unencrypted, and hosted on the same machine as the application. In production, the database settings must be engineered for high availability, durability, and speed. Connection Pooling production-settings
SECURE_SSL_REDIRECT = True SECURE_HSTS_SECONDS = 31536000 # 1 year SECURE_HSTS_INCLUDE_SUBDOMAINS = True SECURE_HSTS_PRELOAD = True production-settings