DrValera commited on
Commit
c0873c4
·
verified ·
1 Parent(s): cd766cf

Global limit 100/10 minutes

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -25,7 +25,7 @@ def client_ip(request: Request):
25
  return xff.split(",")[0].strip() if xff else (request.client.host or "0.0.0.0")
26
 
27
  limiter = Limiter(key_func=client_ip) # or get_remote_address
28
- GLOBAL_LIMIT = limiter.limit("5/10minute", key_func=lambda: "global:any") # global limit
29
 
30
  app.state.limiter = limiter
31
  app.add_middleware(SlowAPIMiddleware)
 
25
  return xff.split(",")[0].strip() if xff else (request.client.host or "0.0.0.0")
26
 
27
  limiter = Limiter(key_func=client_ip) # or get_remote_address
28
+ GLOBAL_LIMIT = limiter.limit("100/10minute", key_func=lambda: "global:any") # global limit
29
 
30
  app.state.limiter = limiter
31
  app.add_middleware(SlowAPIMiddleware)