mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
reddit_base: Stricter User Agent ratelimiting.
This stops ratelimit checking after the first hit so that more specific matches won't get extra ratelimiting from a more generic match.
This commit is contained in:
@@ -551,6 +551,7 @@ def ratelimit_agents():
|
||||
for s in g.agents:
|
||||
if s and user_agent and s in user_agent:
|
||||
ratelimit_agent(s)
|
||||
return
|
||||
|
||||
def ratelimit_throttled():
|
||||
ip = request.ip.strip()
|
||||
|
||||
Reference in New Issue
Block a user