diff options
Diffstat (limited to 'lib/app.js')
| -rw-r--r-- | lib/app.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -19,6 +19,12 @@ const app = fastify({ maxParamLength: 500, }); +await app.register(import("@fastify/rate-limit"), { + max: 50, + timeWindow: 5000, + keyGenerator: (req) => req.headers["cf-connecting-ip"], +}); + app.register(fastifySecureSession, { key: Buffer.from(config.jwt, "hex"), }); |
