Add a basic rate limit
This commit is contained in:
parent
67095752d2
commit
4a82d1262d
1 changed files with 12 additions and 0 deletions
|
@ -211,3 +211,15 @@ if DEBUG:
|
|||
|
||||
|
||||
SWAGGER_SETTINGS = {"USE_SESSION_AUTH": False, "SECURITY_DEFINITIONS": {}}
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
"DEFAULT_THROTTLE_CLASSES": [
|
||||
"rest_framework.throttling.AnonRateThrottle",
|
||||
],
|
||||
"DEFAULT_THROTTLE_RATES": {
|
||||
"anon": "10/min",
|
||||
},
|
||||
"DEFAULT_AUTHENTICATION_CLASSES": [
|
||||
"rest_framework.authentication.SessionAuthentication",
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue