summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorxnacly <matteogropp@gmail.com>2021-04-08 17:53:16 +0200
committerxnacly <matteogropp@gmail.com>2021-04-08 17:53:16 +0200
commit3252e91f6b99c3b8c7adf90485b83d9bc10a887d (patch)
tree715b77ccdc7e12b6ef87e4e6f49e6cbb27535efd /src
parent:page_facing_up: use Creative Commons Attribution-NonCommercial-ShareAlike 4.... (diff)
downloadserver-3252e91f6b99c3b8c7adf90485b83d9bc10a887d.tar.xz
exclude path from authentication
Diffstat (limited to 'src')
-rw-r--r--src/middlewares/Authentication.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts

index f2cd438c..30445815 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts
@@ -21,6 +21,7 @@ declare global { export async function Authentication(req: Request, res: Response, next: NextFunction) { 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) => req.url.startsWith(x))) return next(); if (!req.headers.authorization) return next(new HTTPError("Missing Authorization Header", 401)); // TODO: check if user is banned/token expired