1
0
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:
zhengxie
2012-12-26 11:03:38 +08:00
parent 1409bda65f
commit 4340d1d98d
2 changed files with 24 additions and 3 deletions

View File

@@ -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