diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-08 17:22:00 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-08 17:22:00 +0200 |
commit | cfde9dd2d53982e2433da158847b76db78f14298 (patch) | |
tree | 5df8ec958248a3079d1d499b9b7e60b59cff32ab | |
parent | :sparkles: get cdn endpoint from env (diff) | |
download | server-cfde9dd2d53982e2433da158847b76db78f14298.tar.xz |
:sparkles: ping route
-rw-r--r-- | src/middlewares/Authentication.ts | 1 | ||||
-rw-r--r-- | src/routes/ping.ts | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts index 76b335ad..01b7ef57 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts @@ -6,6 +6,7 @@ export const NO_AUTHORIZATION_ROUTES = [ /^\/api(\/v\d+)?\/auth\/login/, /^\/api(\/v\d+)?\/auth\/register/, /^\/api(\/v\d+)?\/webhooks\//, + /^\/api(\/v\d+)?\/ping/, /^\/api(\/v\d+)?\/gateway/, /^\/api(\/v\d+)?\/experiments/, /^\/api(\/v\d+)?\/guilds\/\d+\/widget\.(json|png)/ diff --git a/src/routes/ping.ts b/src/routes/ping.ts new file mode 100644 index 00000000..38daf81e --- /dev/null +++ b/src/routes/ping.ts @@ -0,0 +1,9 @@ +import { Router, Response, Request } from "express"; + +const router = Router(); + +router.get("/", (req: Request, res: Response) => { + res.send("pong"); +}); + +export default router; |