feat: add cache to block IPs from brute force attempts

This commit is contained in:
2025-07-05 16:09:36 -07:00
parent 42bad8c6c8
commit 4ca9042bcd
5 changed files with 79 additions and 1 deletions

View File

@ -6,6 +6,7 @@
import fastify from "fastify";
import { corsHook } from "./hooks/cors.js";
import { ipHook } from "./hooks/ips.js";
import { announcementRoutes } from "./routes/announcement.js";
import { baseRoutes } from "./routes/base.js";
import { logger } from "./utils/logger.js";
@ -15,6 +16,7 @@ const server = fastify({
});
server.addHook("preHandler", corsHook);
server.addHook("preHandler", ipHook);
server.register(baseRoutes);
server.register(announcementRoutes);