habitica-self-host/test/api/unit/middlewares
Matteo Pagliazzi f1173cee6a
API v3 Rate Limiter (#12117)
* simplify ip address management by using the trust proxy express option

* add setupExpress file

* fix redirects middleware tests

* fix lint

* short circuit the ip blocking middleware

* basic implementation with ip based limiting

* improve logging

* upgrade apidoc

* apidoc: add introduction section

* fix lint

* fix tests

* fix lint

* add unit tests for rate limiter

* do not send retry-after header when points are available

* automatically fix lint

* fix more lint issues

* use userId as key for rate limit when available
2020-07-17 16:13:51 +02:00
..
analytics.test.js Automatically Logout Banned Users (#12037) 2020-04-02 21:46:01 +02:00
auth.test.js fix test lint 2019-10-08 20:45:38 +02:00
cache.test.js add basic test, disable etag on post routes as well, paypal ipn: prevent set headers after response error 2020-04-17 14:50:09 +02:00
cors.test.js fix(cors): allow authorization header 2020-07-12 18:22:52 +02:00
cronMiddleware.js Automatically Logout Banned Users (#12037) 2020-04-02 21:46:01 +02:00
ensureAccessRight.test.js fix test lint 2019-10-08 20:45:38 +02:00
ensureDevelpmentMode.js fix test lint 2019-10-08 20:45:38 +02:00
errorHandler.test.js fix(apple auth): do not try to parse name if it is missing, add query parameters to logs 2020-04-18 16:02:18 +02:00
ipBlocker.test.js API v3 Rate Limiter (#12117) 2020-07-17 16:13:51 +02:00
language.test.js Automatically Logout Banned Users (#12037) 2020-04-02 21:46:01 +02:00
maintenanceMode.test.js fix test lint 2019-10-08 20:45:38 +02:00
rateLimiter.test.js API v3 Rate Limiter (#12117) 2020-07-17 16:13:51 +02:00
redirects.js API v3 Rate Limiter (#12117) 2020-07-17 16:13:51 +02:00
response.js chore: update sub-deps and fix lint 2020-07-01 18:20:18 +02:00