This commit is contained in:
Joaquim Peixoto
2021-06-25 14:54:13 +01:00
parent 075db9523b
commit ef19ecedb7
3 changed files with 47 additions and 10650 deletions
+1
View File
@@ -21,6 +21,7 @@ declare global {
}
export async function Authentication(req: Request, res: Response, next: NextFunction) {
if (req.method === "OPTIONS") return res.sendStatus(204);
if (!req.url.startsWith("/api")) return next();
if (req.url.startsWith("/api/v8/invites") && req.method === "GET") return next();
if (NO_AUTHORIZATION_ROUTES.some((x) => x.test(req.url))) return next();