04/27 Fixed some issues 2

This commit is contained in:
2026-04-27 13:46:02 -04:00
parent 821cd929f1
commit 7d27a8ec49
4 changed files with 39 additions and 17 deletions
+4 -1
View File
@@ -19,7 +19,10 @@ csrf = CSRFProtect() # initialized here; .init_app() called in creat
limiter = Limiter(
key_func = get_remote_address,
default_limits = [], # no global limit — applied per-route only
storage_uri = 'memory://', # in-process; swap for 'redis://...' in multi-worker setups
# Use Redis when REDIS_URL is set in the environment (production multi-worker).
# Falls back to in-process memory for local development (single-worker only;
# counters are NOT shared across Gunicorn workers in memory:// mode).
storage_uri = os.environ.get('REDIS_URL', 'memory://'),
)