diff --git a/django_oci/views/blobs.py b/django_oci/views/blobs.py index ff6559f..7e56bb9 100644 --- a/django_oci/views/blobs.py +++ b/django_oci/views/blobs.py @@ -31,7 +31,7 @@ from ratelimit.mixins import RatelimitMixin -class BlobDownload(APIView): +class BlobDownload(RatelimitMixin, APIView): """Given a GET request for a blob, stream the blob.""" ratelimit_key = "ip" @@ -78,7 +78,7 @@ def delete(self, request, *args, **kwargs): return storage.delete_blob(name, digest) -class BlobUpload(APIView): +class BlobUpload(RatelimitMixin, APIView): """An image push will receive a request to push, authenticate the user, and return an upload url (url is /v2//blobs/uploads/) """ diff --git a/django_oci/views/image.py b/django_oci/views/image.py index b5007a4..92f863b 100644 --- a/django_oci/views/image.py +++ b/django_oci/views/image.py @@ -28,7 +28,7 @@ from django_oci.auth import is_authenticated -class ImageTags(APIView, RatelimitMixin): +class ImageTags(RatelimitMixin, APIView): """Return a list of tags for an image.""" ratelimit_key = "ip" @@ -86,7 +86,7 @@ def get(self, request, *args, **kwargs): return Response(status=200, data=data) -class ImageManifest(APIView): +class ImageManifest(RatelimitMixin, APIView): """An Image Manifest holds the configuration and metadata about an image GET: is to retrieve an existing image manifest PUT: is to push a manifest