Implement API rate limits • 1000/day

This commit is contained in:
Corban-Lee Jones 2024-01-17 23:19:16 +00:00
parent 79145b1e84
commit eb2c8439fe

View File

@ -214,6 +214,20 @@ MEDIA_URL = '/media/'
#############################################################
#############################################################
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': [
'rest_framework.throttling.AnonRateThrottle',
'rest_framework.throttling.UserRateThrottle'
],
'DEFAULT_THROTTLE_RATES': {
'anon': '100/day',
'user': '1000/day'
}
}
#############################################################
#############################################################
# If route isnt found, try again with appended slash
APPEND_SLASH = True