Fix some issues

This commit is contained in:
2026-03-26 13:18:09 -04:00
parent ae6a44199f
commit 169820240a
25 changed files with 319 additions and 38 deletions
+11
View File
@@ -22,6 +22,7 @@ class Config:
MAIL_SERVER = os.environ.get('MAIL_SERVER', 'localhost')
MAIL_PORT = int(os.environ.get('MAIL_PORT', 587))
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS', 'True').lower() == 'true'
MAIL_USE_SSL = os.environ.get('MAIL_USE_SSL', 'False').lower() == 'true'
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
MAIL_DEFAULT_SENDER = os.environ.get('MAIL_DEFAULT_SENDER', 'IT Helpdesk <noreply@yourdomain.com>')
@@ -46,6 +47,16 @@ class Config:
# Anthropic AI
ANTHROPIC_API_KEY = os.environ.get('ANTHROPIC_API_KEY', '')
# Rate limiting storage.
# The `limits` library (used by Flask-Limiter) does not support MySQL as a
# storage backend — its only supported schemes are memory://, redis://, and
# memcached://. Since gunicorn.conf.py enforces a single worker process
# (workers = 1, worker_class = eventlet), in-process memory is both correct
# and sufficient — there is no other worker to share counters with, and a
# counter reset on restart is an acceptable trade-off versus adding Redis.
# To switch to Redis when it becomes available: set RATELIMIT_STORAGE_URI=redis://...
RATELIMIT_STORAGE_URI = os.environ.get('RATELIMIT_STORAGE_URI', 'memory://')
# Admin
ADMIN_EMAIL = os.environ.get('ADMIN_EMAIL', 'admin@yourdomain.com')
ADMIN_PASSWORD = os.environ.get('ADMIN_PASSWORD', 'Admin@123!')