Internal
Public Access
Added validation to ensure ALLOWED_HOSTS is explicitly set in production. Changes: - Check if ALLOWED_HOSTS environment variable is set - Raise ValueError with helpful message if not set - Use os.environ['ALLOWED_HOSTS'] instead of .get() to enforce requirement - Prevents empty or missing ALLOWED_HOSTS from bypassing host validation Security impact: - Prevents host header injection attacks - Blocks cache poisoning via host header manipulation - Ensures production deployments have explicit allowed hosts configured - Fails fast with clear error message if misconfigured 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>