mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 15:19:06 +00:00
Added throttling to api2
This commit is contained in:
11
settings.py
11
settings.py
@@ -161,6 +161,17 @@ CACHES = {
|
||||
}
|
||||
}
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_THROTTLE_CLASSES': (
|
||||
'rest_framework.throttling.AnonRateThrottle',
|
||||
'rest_framework.throttling.UserRateThrottle',
|
||||
),
|
||||
'DEFAULT_THROTTLE_RATES': {
|
||||
'anon': '5/minute',
|
||||
'user': '300/minute',
|
||||
},
|
||||
}
|
||||
|
||||
MAX_UPLOAD_FILE_SIZE = 100 * 1024 * 1024 # 100 MB
|
||||
MAX_UPLOAD_FILE_NAME_LEN = 255
|
||||
MAX_FILE_NAME = MAX_UPLOAD_FILE_NAME_LEN
|
||||
|
Reference in New Issue
Block a user