mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-10 06:35:03 -05:00
error pages shouldn't trip the 503 rate limiter
This commit is contained in:
@@ -85,6 +85,7 @@ class ErrorController(RedditController):
|
||||
allowed_render_styles = ('html', 'xml', 'js', 'embed', '')
|
||||
def __before__(self):
|
||||
try:
|
||||
c.error_page = True
|
||||
RedditController.__before__(self)
|
||||
except:
|
||||
handle_awful_failure("Error occurred in ErrorController.__before__")
|
||||
|
||||
@@ -433,7 +433,8 @@ class RedditController(BaseController):
|
||||
g.cache.caches = (LocalCache(),) + g.cache.caches[1:]
|
||||
|
||||
#check if user-agent needs a dose of rate-limiting
|
||||
ratelimit_agents()
|
||||
if not c.error_page:
|
||||
ratelimit_agents()
|
||||
|
||||
# the domain has to be set before Cookies get initialized
|
||||
set_subreddit()
|
||||
|
||||
Reference in New Issue
Block a user