Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hunter T Jozwiak
whats-open
Commits
e2ed1e43
Verified
Commit
e2ed1e43
authored
Jul 22, 2017
by
David Haynes
🙆
Browse files
Rate limit anons @ 1000/day
- easy, thanks DRF
parent
e488a0c1
Changes
1
Show whitespace changes
Inline
Side-by-side
whats-open/settings/base.py
View file @
e2ed1e43
...
@@ -262,7 +262,14 @@ REST_FRAMEWORK = {
...
@@ -262,7 +262,14 @@ REST_FRAMEWORK = {
# or allow read-only access for unauthenticated users.
# or allow read-only access for unauthenticated users.
'DEFAULT_PERMISSION_CLASSES'
:
[
'DEFAULT_PERMISSION_CLASSES'
:
[
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
]
],
# http://www.django-rest-framework.org/api-guide/throttling/#throttling
'DEFAULT_THROTTLE_CLASSES'
:
(
'rest_framework.throttling.AnonRateThrottle'
,
),
'DEFAULT_THROTTLE_RATES'
:
{
'anon'
:
'1000/day'
,
}
}
}
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment