Skip to content

Commit

Permalink
Remove AllowAllCORSMixin from some API views
Browse files Browse the repository at this point in the history
Remove the AllowAllCORSMixin from every API except LegacyProfileRetrieveApiView,
which is unlikely to cause any problems from being opened but also might not work
because it redirects to a page that likely isn't open
  • Loading branch information
x753 committed Feb 19, 2025
1 parent f858125 commit 4b65d64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from thunderstore.cache.cache import ManualCacheCommunityMixin
from thunderstore.cache.enums import CacheBustCondition
from thunderstore.core.mixins import AllowAllCORSMixin
from thunderstore.repository.api.experimental.serializers import (
PackageSerializerExperimental,
)
Expand Down Expand Up @@ -65,9 +64,7 @@ def get_queryset(self):
return get_package_queryset()


class PackageDetailApiView(
AllowAllCORSMixin, ManualCacheCommunityMixin, RetrieveAPIView
):
class PackageDetailApiView(ManualCacheCommunityMixin, RetrieveAPIView):
"""
Get a single package
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from thunderstore.cache.cache import ManualCacheCommunityMixin
from thunderstore.cache.enums import CacheBustCondition
from thunderstore.core.mixins import AllowAllCORSMixin
from thunderstore.repository.api.experimental.serializers import (
MarkdownResponseSerializer,
PackageVersionSerializerExperimental,
Expand Down Expand Up @@ -90,7 +89,7 @@ def retrieve(self, request, *args, **kwargs):
return Response(serializer.data)


class PackageVersionReadmeApiView(AllowAllCORSMixin, PackageVersionDetailMixin):
class PackageVersionReadmeApiView(PackageVersionDetailMixin):
"""
Get a package verion's readme
"""
Expand Down

0 comments on commit 4b65d64

Please sign in to comment.