Skip to content

Commit f7b8ac4

Browse files
committed
fix: don't require authentication for webhooks
1 parent d39c6e1 commit f7b8ac4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/handlers/middleware.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { isStaff } from '../utils';
88

99
const checkIfAuthenticated = function(req: Request, res: Response, next: NextFunction) {
1010
if (req.path.startsWith('/login') || req.path.startsWith('/logout') || res.statusCode === 503) {
11-
return next();
11+
return next(); // Don't require authentication for login/logout
12+
}
13+
if (req.path.startsWith('/hooks/')) {
14+
return next(); // Don't require authentication for webhooks
1215
}
1316
if (req.isAuthenticated()) {
1417
return next();

0 commit comments

Comments
 (0)