Complete the code to run the Django security checklist command.
python manage.py [1] --deployThe check command runs system checks, and with --deploy it focuses on security and deployment issues.
Complete the setting to ensure Django uses HTTPS for cookies.
SESSION_COOKIE_SECURE = [1]Setting SESSION_COOKIE_SECURE = True tells Django to send cookies only over HTTPS, improving security.
Fix the error in the setting to prevent clickjacking attacks.
X_FRAME_OPTIONS = '[1]'
Setting X_FRAME_OPTIONS = 'SAMEORIGIN' prevents your site from being framed by other sites, protecting against clickjacking.
Fill both blanks to set security headers for HTTPS and content sniffing protection.
SECURE_HSTS_SECONDS = [1] SECURE_CONTENT_TYPE_NOSNIFF = [2]
SECURE_HSTS_SECONDS sets how long browsers remember to use HTTPS. 31536000 is one year in seconds.SECURE_CONTENT_TYPE_NOSNIFF = True prevents browsers from guessing content types, improving security.
Fill all three blanks to configure secure cookies and SSL redirect.
CSRF_COOKIE_SECURE = [1] SESSION_COOKIE_SECURE = [2] SECURE_SSL_REDIRECT = [3]
Setting CSRF_COOKIE_SECURE and SESSION_COOKIE_SECURE to True ensures cookies are sent only over HTTPS.SECURE_SSL_REDIRECT = True forces all HTTP requests to redirect to HTTPS, improving security.