added the rate limit to the generate interview questions
This commit is contained in:
parent
5471046f46
commit
0cb21885f7
@ -551,4 +551,16 @@ LOGGING = {
|
||||
}
|
||||
|
||||
|
||||
SECURED_FIELDS_KEY="kvaCwxrIMtVRouBH5mzf9g-uelv7XUD840ncAiOXkt4="
|
||||
SECURED_FIELDS_KEY="kvaCwxrIMtVRouBH5mzf9g-uelv7XUD840ncAiOXkt4="
|
||||
|
||||
|
||||
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": "redis://127.0.0.1:6379/1",
|
||||
"OPTIONS": {
|
||||
"CLIENT_CLASS": "django_redis.client.DefaultClient",
|
||||
}
|
||||
}
|
||||
}
|
||||
2
recruitment/middleware.py
Normal file
2
recruitment/middleware.py
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@ -4800,6 +4800,7 @@ def interview_list(request):
|
||||
|
||||
|
||||
from django_ratelimit.decorators import ratelimit
|
||||
@ratelimit(key='user_or_ip', rate='1/m', block=True)
|
||||
@login_required
|
||||
@staff_user_required
|
||||
def generate_ai_questions(request, slug):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user