Skip to content

Commit

Permalink
Added throttling policy for unauthenticated users (#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 <[email protected]>
  • Loading branch information
azhavoro and nmanovic authored Jun 1, 2020
1 parent 35badcc commit 4477e17
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 @@ -148,6 +148,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 4477e17

Please sign in to comment.