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); }