mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
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:
@@ -148,7 +148,7 @@ def rest_dispatch(request: HttpRequest, **kwargs: Any) -> HttpResponse:
|
||||
allow_webhook_access="allow_incoming_webhooks" in view_flags,
|
||||
)(target_function)
|
||||
elif (
|
||||
request.path.startswith(("/json", "/avatar"))
|
||||
request.path.startswith(("/json", "/avatar", "/user_uploads", "/thumbnail"))
|
||||
and "allow_anonymous_user_web" in view_flags
|
||||
):
|
||||
# For endpoints that support anonymous web access, we do that.
|
||||
|
||||
Reference in New Issue
Block a user