mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Added throttling rates
This commit is contained in:
parent
fc031e9e51
commit
122938a8b5
1 changed files with 15 additions and 0 deletions
|
@ -141,6 +141,21 @@ REST_FRAMEWORK = {
|
|||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
||||
),
|
||||
'DEFAULT_THROTTLE_CLASSES': [
|
||||
|
||||
'rest_framework.throttling.AnonRateThrottle',
|
||||
|
||||
'rest_framework.throttling.UserRateThrottle'
|
||||
|
||||
],
|
||||
|
||||
'DEFAULT_THROTTLE_RATES': {
|
||||
|
||||
'anon': '360/min',
|
||||
|
||||
'user': '1440/min'
|
||||
|
||||
},
|
||||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue