chore: add rate limiting in magic generate endpoint (#5322)
This commit is contained in:
parent
86909cff14
commit
520938ab5c
1 changed files with 5 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ from plane.authentication.adapter.error import (
|
|||
AuthenticationException,
|
||||
AUTHENTICATION_ERROR_CODES,
|
||||
)
|
||||
from plane.authentication.rate_limit import AuthenticationThrottle
|
||||
|
||||
|
||||
class MagicGenerateEndpoint(APIView):
|
||||
|
|
@ -37,6 +38,10 @@ class MagicGenerateEndpoint(APIView):
|
|||
AllowAny,
|
||||
]
|
||||
|
||||
throttle_classes = [
|
||||
AuthenticationThrottle,
|
||||
]
|
||||
|
||||
def post(self, request):
|
||||
# Check if instance is configured
|
||||
instance = Instance.objects.first()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue