diff --git a/r2/example.ini b/r2/example.ini index 6fc8fe740..c4e0ec2b5 100644 --- a/r2/example.ini +++ b/r2/example.ini @@ -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 = diff --git a/r2/r2/controllers/reddit_base.py b/r2/r2/controllers/reddit_base.py index 654f7f2e5..711b4b54d 100644 --- a/r2/r2/controllers/reddit_base.py +++ b/r2/r2/controllers/reddit_base.py @@ -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(): diff --git a/r2/r2/lib/app_globals.py b/r2/r2/lib/app_globals.py index f81a1792c..0fcb23f84 100644 --- a/r2/r2/lib/app_globals.py +++ b/r2/r2/lib/app_globals.py @@ -227,7 +227,6 @@ class Globals(object): 'ENFORCE_RATELIMIT', 'RL_SITEWIDE_ENABLED', 'RL_OAUTH_SITEWIDE_ENABLED', - 'RL_STRICT_ENFORCEMENT', ], ConfigValue.tuple: [