Commit Graph

12 Commits

Author SHA1 Message Date
Tom Moor
9936f42882 Avoid fsstat on every request, remove koa-static (#4387)
* Avoid fsstat on every request, remove koa-static

* tsx

* Move compression middleware
2022-11-05 06:50:46 -07:00
Tom Moor
8302840ab5 feat: Add timeout to incoming requests 2022-08-19 08:14:11 +02:00
Tom Moor
41d7cc26b5 chore: Adds name to Redis connections for debugging (#3982)
* chore: Adds name to Redis connections for debugging, minor associated refactoring

* Upgrade bull, ioredis

* Add pid to redis connection name in development
2022-08-17 12:55:57 -07:00
Apoorv Mishra
7eaa8eb961 feat: Put request rate limit at application server (#3857)
* feat: Put request rate limit at application server

This PR contains implementation for a blanket rate limiter at
application server level. Currently the allowed throughput is set high
only to be changed later as per the actual data gathered.

* Simplify implementation

1. Remove shutdown handler to purge rate limiter keys
2. Have separate keys for default and custom(route-based) rate limiters
3. Do not kill default rate limiter because it is not needed anymore due
   to (2) above

* Set 60s as default for rate limiting window

* Fix env types
2022-08-11 15:40:30 +05:30
CuriousCorrelation
746dc30aeb feat: Add pending migrations check during startup (#3744)
* feat: Add pending migrations check during startup

* fix: migration pending log message

Co-authored-by: Tom Moor <tom.moor@gmail.com>

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-07-08 11:30:16 -07:00
Tom Moor
1f3a1d4b86 fix: Improved websockets error handling (#3726)
* fix: Add websocket client error capturing
fix: Incorrect parsing of documentName will never be empty

* fix: Non-present documentId in collaboration route should trigger an error response

* fix: Close unhandled websocket requests
2022-07-03 00:00:59 -07:00
Tom Moor
bf0ff6c823 chore: Casing of logger -> Logger as it's an instantiated class 2022-05-21 13:59:23 +01:00
Tom Moor
3c002f82cc chore: Centralize env parsing, validation, defaults, and deprecation notices (#3487)
* chore: Centralize env parsing, defaults, deprecation

* wip

* test

* test

* tsc

* docs, more validation

* fix: Allow empty REDIS_URL (defaults to localhost)

* test

* fix: SLACK_MESSAGE_ACTIONS not bool

* fix: Add SMTP port validation
2022-05-19 08:05:11 -07:00
Tom Moor
15cecf1e53 Upgrade dd-trace, add APM tracing around key commands, fix tags should be attached to root spans (#3243) 2022-03-14 20:03:12 -07:00
Tom Moor
e4dbd67ae1 feat: Support SSL without reverse proxy (#2959)
* Enable (optional) reading SSL certificates on startup

* Update gitignore

* fix: Expect ssl environment variables to be Base64 encoded

* docs: Add env variables to .env.sample
2022-01-22 17:40:55 -08:00
Tom Moor
b20a341f0c chore: Typescript database models (#2886)
closes #2798
2022-01-06 18:24:28 -08:00
Tom Moor
15b1069bcc chore: Move to Typescript (#2783)
This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously.

closes #1282
2021-11-29 06:40:55 -08:00