* Use [node-]redis as a direct dependency * Extract Redis client creation to its own module * Attach extensive logging in the Redis client creation module * Allow the rate limiter to pass requests when Redis is disconnected * Update rate-limit-redis * Default error input to empty object for formatRedisError method * Provide a name for the rate limiter's Redis client * Include redis-mock, exclude ioredis/ioredis-mock * Remove unused RedisAccessor#exists method * Switch RedisAccessor to use redis/redis-mock * Provide a name for logging on the Redis page cache * Remove extraneous trailing space from Redis logging prefix Our updated use of console.* will already be adding a space after the prefix * Replace ioredis-mock with redis-mock in tests * Revert removal of ioredis dependency * Bind Redis client to async promisified methods * Extract former RedisAccessor constructor tests to new create-client tests * Update RedisAccessor tests to work with the callback-based redis client * Handle formatting Redis errors (or not) with more resiliency
Middleware
Each file in this directory exports an Express Middleware function.
For more info, see https://expressjs.com/en/guide/using-middleware.html
Subdirectories
There are subdirectories for different types of middleware:
- contextualizers modify the
req.contextobject that is used to render pages. - redirects handle... redirects!