From 0c03aa46ba8a1057494d6c34517d8b79bd3a4202 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Tue, 24 Sep 2024 20:42:19 +0100 Subject: [PATCH] Fix middleware logic --- src/middleware/host-limit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/host-limit.ts b/src/middleware/host-limit.ts index 17cefc6..c23e49e 100644 --- a/src/middleware/host-limit.ts +++ b/src/middleware/host-limit.ts @@ -5,7 +5,7 @@ export function restrictHostnames( fn: TFn ): (request: express.Request, response: express.Response, next: () => void) => void | TFn { return (request: express.Request, response: express.Response, next: () => void) => { - if (!allowedHostnames.includes(request.hostname)) { + if (allowedHostnames.includes(request.hostname)) { return fn(request, response, next); }