Skip to content

Commit

Permalink
Added throttling policy for unauthenticated users (cvat-ai#1531)
Browse files Browse the repository at this point in the history
* added throttling policy for unauthenticated users

* updated changelog

Co-authored-by: Nikita Manovich <40690625+nmanovic@users.noreply.github.com>
  • Loading branch information
2 people authored and Fernando Martínez González committed Aug 3, 2020
1 parent 7233c03 commit 07f51f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.1.0-alpha] - Unreleased
### Added
-
- Throttling policy for unauthenticated users (<https://github.com/opencv/cvat/pull/1531>)

### Changed
-
Expand Down
6 changes: 6 additions & 0 deletions cvat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ def generate_ssh_keys():

# Disable default handling of the 'format' query parameter by REST framework
'URL_FORMAT_OVERRIDE': 'scheme',
'DEFAULT_THROTTLE_CLASSES': [
'rest_framework.throttling.AnonRateThrottle',
],
'DEFAULT_THROTTLE_RATES': {
'anon': '100/hour',
},
}

REST_AUTH_REGISTER_SERIALIZERS = {
Expand Down

0 comments on commit 07f51f2

Please sign in to comment.