Skip to content

Commit

Permalink
chore: added rate limiting
Browse files Browse the repository at this point in the history
  • Loading branch information
gurusainath committed Dec 19, 2024
1 parent 74932f5 commit 511655f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apiserver/plane/app/views/timezone/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import pytz
from datetime import datetime


# Django imports
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
Expand All @@ -13,10 +12,15 @@
from rest_framework.permissions import AllowAny
from rest_framework.views import APIView

# Module imports
from plane.authentication.rate_limit import AuthenticationThrottle


class TimezoneEndpoint(APIView):
permission_classes = [AllowAny]

throttle_classes = [AuthenticationThrottle]

@method_decorator(cache_page(60 * 60 * 24))
def get(self, request):
timezone_mapping = {
Expand Down

0 comments on commit 511655f

Please sign in to comment.