Use a dedicated scope for throttling subsonic to avoid intrusive rate-limiting
This commit is contained in:
parent
82692f1170
commit
9d73a77f7e
3 changed files with 6 additions and 0 deletions
|
|
@ -104,6 +104,7 @@ class SubsonicViewSet(viewsets.GenericViewSet):
|
|||
content_negotiation_class = negotiation.SubsonicContentNegociation
|
||||
authentication_classes = [authentication.SubsonicAuthentication]
|
||||
permission_classes = [rest_permissions.IsAuthenticated]
|
||||
throttling_scopes = {"*": {"authenticated": "subsonic", "anonymous": "subsonic"}}
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if not preferences.get("subsonic__enabled"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue