Skip to content

Commit 4b65d64

Browse files
committed
Remove AllowAllCORSMixin from some API views
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
1 parent f858125 commit 4b65d64

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

django/thunderstore/repository/api/experimental/views/package.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from thunderstore.cache.cache import ManualCacheCommunityMixin
88
from thunderstore.cache.enums import CacheBustCondition
9-
from thunderstore.core.mixins import AllowAllCORSMixin
109
from thunderstore.repository.api.experimental.serializers import (
1110
PackageSerializerExperimental,
1211
)
@@ -65,9 +64,7 @@ def get_queryset(self):
6564
return get_package_queryset()
6665

6766

68-
class PackageDetailApiView(
69-
AllowAllCORSMixin, ManualCacheCommunityMixin, RetrieveAPIView
70-
):
67+
class PackageDetailApiView(ManualCacheCommunityMixin, RetrieveAPIView):
7168
"""
7269
Get a single package
7370
"""

django/thunderstore/repository/api/experimental/views/package_version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from thunderstore.cache.cache import ManualCacheCommunityMixin
77
from thunderstore.cache.enums import CacheBustCondition
8-
from thunderstore.core.mixins import AllowAllCORSMixin
98
from thunderstore.repository.api.experimental.serializers import (
109
MarkdownResponseSerializer,
1110
PackageVersionSerializerExperimental,
@@ -90,7 +89,7 @@ def retrieve(self, request, *args, **kwargs):
9089
return Response(serializer.data)
9190

9291

93-
class PackageVersionReadmeApiView(AllowAllCORSMixin, PackageVersionDetailMixin):
92+
class PackageVersionReadmeApiView(PackageVersionDetailMixin):
9493
"""
9594
Get a package verion's readme
9695
"""

0 commit comments

Comments
 (0)