diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-04-12 20:32:48 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-04-13 12:00:16 +0200 |
commit | 66835476b59b8be7593d4cfa03a51c4f265d7e26 (patch) | |
tree | 91770c8fe403da25af50e6336727ab55fe57cd27 /.drone.yml | |
parent | 5505faa3d7b6f5a95f18fe5027355d700d69f396 (diff) | |
download | nextcloud-server-66835476b59b8be7593d4cfa03a51c4f265d7e26.tar.gz nextcloud-server-66835476b59b8be7593d4cfa03a51c4f265d7e26.zip |
Add support for ratelimiting via annotations
This allows adding rate limiting via annotations to controllers, as one example:
```
@UserRateThrottle(limit=5, period=100)
@AnonRateThrottle(limit=1, period=100)
```
Would mean that logged-in users can access the page 5 times within 100 seconds, and anonymous users 1 time within 100 seconds. If only an AnonRateThrottle is specified that one will also be applied to logged-in users.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to '.drone.yml')
-rw-r--r-- | .drone.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml index 24e06dd1b25..61d778fc0da 100644 --- a/.drone.yml +++ b/.drone.yml @@ -277,6 +277,17 @@ pipeline: when: matrix: TESTS: integration-maintenance-mode + integration-ratelimiting: + image: nextcloudci/integration-php7.0:integration-php7.0-3 + commands: + - ./occ maintenance:install --admin-pass=admin + - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local + - ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed + - cd build/integration + - ./run.sh features/ratelimiting.feature + when: + matrix: + TESTS: integration-ratelimiting integration-carddav: image: nextcloudci/integration-php7.0:integration-php7.0-3 commands: @@ -516,6 +527,7 @@ matrix: - TESTS: integration-capabilities_features - TESTS: integration-federation_features - TESTS: integration-maintenance-mode + - TESTS: integration-ratelimiting - TESTS: integration-auth - TESTS: integration-carddav - TESTS: integration-dav-v2 |