- Localhost-only - Binds to 127.0.0.1
- Input validation - 500 char max, null byte sanitization
- Rate limiting - 30 req/min per IP
- Optional auth - API key via
X-API-Keyheader - CORS - Restricted to localhost:3200-3202
- Safe execution - No shell injection, eval, or exec
export TTS_API_KEY=$(openssl rand -base64 32)
python3 -m app.api_servercurl -H "X-API-Key: your-key" http://localhost:5003/api/tts?text=Hello- Enable authentication (TTS_API_KEY)
- Use HTTPS reverse proxy
- Configure firewall
- Update CORS origins
- Monitor rate limits
| Protection | Status |
|---|---|
| Command injection | ✅ Safe subprocess |
| Path traversal | ✅ Hardcoded paths |
| DoS | ✅ Rate limiting |
| XSS | ✅ No HTML rendering |
| CSRF | ✅ CORS + localhost |
Email maintainer directly - do not create public issues.