Skip to content

Commit

Permalink
Fix middleware logic
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryoverload committed Sep 24, 2024
1 parent 4de42cf commit 0c03aa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/host-limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function restrictHostnames<TFn extends express.Router>(
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);
}

Expand Down

0 comments on commit 0c03aa4

Please sign in to comment.