upload: Allow rate limited access to spectators for uploaded files.

We allow spectators access to uploaded files in web public streams
but rate limit the daily requests to 1000 per file by default.
This commit is contained in:
Aman Agrawal
2021-11-02 14:42:58 +00:00
committed by Tim Abbott
parent abea1f4598
commit b799ec32b0
9 changed files with 194 additions and 21 deletions

View File

@@ -394,6 +394,9 @@ RATE_LIMITING_RULES = {
"sends_email_by_ip": [
(86400, 5),
],
"spectator_attachment_access_by_file": [
(86400, 1000), # 1000 per day per file
],
}
# List of domains that, when applied to a request in a Tornado process,