Bird
0
0

You want to deploy a Flask app securely in production. Which combination of steps is best practice?

hard📝 Application Q15 of 15
Flask - Deployment
You want to deploy a Flask app securely in production. Which combination of steps is best practice?
AUse Flask built-in server, enable debug mode, and hardcode secret keys
BUse Gunicorn server, disable debug mode, and keep secret keys out of code
CUse Gunicorn server, enable debug mode, and store secret keys in code
DUse Flask built-in server, disable debug mode, and ignore secret keys
Step-by-Step Solution
Solution:
  1. Step 1: Choose a production-ready server

    Gunicorn is a production server designed to handle real traffic safely.
  2. Step 2: Configure debug mode and secrets

    Debug mode must be off to avoid exposing sensitive info; secret keys should be kept secure and not hardcoded.
  3. Final Answer:

    Use Gunicorn server, disable debug mode, and keep secret keys out of code -> Option B
  4. Quick Check:

    Production needs Gunicorn, no debug, secure secrets [OK]
Quick Trick: Gunicorn + debug off + secure secrets = safe production [OK]
Common Mistakes:
MISTAKES
  • Using built-in server in production
  • Leaving debug mode enabled
  • Hardcoding secret keys in code

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes