Revert "Ratelimits: add strict enforcement mode."

This reverts commit 6b73de5dd5758d7a6df07ad85668af21afb510f8.
This commit is contained in:
Neil Williams
2014-12-30 15:15:37 -08:00
parent 1fb11a187c
commit c01ac9eb9c
3 changed files with 0 additions and 9 deletions

View File

@@ -296,9 +296,6 @@ RL_OAUTH_SITEWIDE_ENABLED = true
RL_OAUTH_RESET_MINUTES = 10
RL_OAUTH_AVG_REQ_PER_SEC = 0.5
# should we get rid of the non-api / cdn exemptions for ratelimits?
RL_STRICT_ENFORCEMENT = false
# user agent substrings to hard-ratelimit to a number of requests per ten second period
# example: agents = googlebot:10, appengine:2
agents =

View File

@@ -980,11 +980,6 @@ class MinimalController(BaseController):
client_id = c.oauth2_access_token.client_id.encode("ascii")
# OAuth2 ratelimits are per user-app combination
key = 'siterl-oauth-' + c.user._id36 + ":" + client_id
elif g.RL_STRICT_ENFORCEMENT:
type_ = "strict"
max_reqs = g.RL_MAX_REQS
period = g.RL_RESET_SECONDS
key = "siterl-strict-" + request.ip
elif c.cdn_cacheable:
type_ = "cdn"
elif not is_api():

View File

@@ -227,7 +227,6 @@ class Globals(object):
'ENFORCE_RATELIMIT',
'RL_SITEWIDE_ENABLED',
'RL_OAUTH_SITEWIDE_ENABLED',
'RL_STRICT_ENFORCEMENT',
],
ConfigValue.tuple: [