04/27 Fixed some issues 2
This commit is contained in:
+4
-1
@@ -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://'),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user