generated from nhcarrigan/template
feat: add cache to block IPs from brute force attempts
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user