mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
reddit_base: Make appengine regex deal with custom User-Agents.
Previously, the AppEngine UA was forced. Now it is only force appended. https://developers.google.com/appengine/docs/python/urlfetch/?hl=en
This commit is contained in:
@@ -542,7 +542,7 @@ def ratelimit_agents():
|
||||
return
|
||||
|
||||
# parse out the appid for appengine apps
|
||||
appengine_match = appengine_re.match(user_agent)
|
||||
appengine_match = appengine_re.search(user_agent)
|
||||
if appengine_match:
|
||||
appid = appengine_match.group(1)
|
||||
ratelimit_agent(appid)
|
||||
|
||||
Reference in New Issue
Block a user