Bird
0
0

If SECURE_HSTS_SECONDS is set to 0 in settings.py, what will manage.py check --deploy report?

medium📝 Predict Output Q5 of 15
Django - Security Best Practices
If SECURE_HSTS_SECONDS is set to 0 in settings.py, what will manage.py check --deploy report?
AError about invalid setting type
BNo warnings, zero disables HSTS safely
CWarning about missing SSL certificate
DWarning that HSTS is not enabled or set to zero
Step-by-Step Solution
Solution:
  1. Step 1: Understand HSTS setting

    SECURE_HSTS_SECONDS controls HTTP Strict Transport Security duration; zero disables it.
  2. Step 2: Check deploy command behavior

    The deploy check warns if HSTS is disabled or set to zero because it reduces security.
  3. Final Answer:

    Warning that HSTS is not enabled or set to zero -> Option D
  4. Quick Check:

    HSTS zero triggers warning = C [OK]
Quick Trick: Set SECURE_HSTS_SECONDS > 0 for production [OK]
Common Mistakes:
MISTAKES
  • Thinking zero disables warnings
  • Confusing HSTS with SSL certificate
  • Expecting error instead of warning

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes