Skip to content

Commit daa0cfc

Browse files
committed
Add throttling to V3 API
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 57cdf99 commit daa0cfc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vulnerabilities/api_v2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,7 @@ class PackageV3ViewSet(viewsets.ReadOnlyModelViewSet):
10301030
serializer_class = PackageV3Serializer
10311031
filter_backends = [filters.DjangoFilterBackend]
10321032
filterset_class = AdvisoryPackageV2FilterSet
1033+
throttle_classes = [AnonRateThrottle, PermissionBasedUserRateThrottle]
10331034

10341035
def get_queryset(self):
10351036
return (

0 commit comments

Comments
 (0)