From 7fde99f55dd39ffba84f195a44c922da69435ed6 Mon Sep 17 00:00:00 2001 From: Thura Moe Myint Date: Mon, 9 Sep 2024 22:08:12 +0700 Subject: [PATCH] PRI-46: Implement CSRF Implement CSRF check --- api/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/index.ts b/api/index.ts index 14bc2a6..79c589a 100644 --- a/api/index.ts +++ b/api/index.ts @@ -24,6 +24,7 @@ if (isDev) { app.use(httpBodyLimiter) app.use(apiLimiter) app.use(cookieParser()); + app.get('/csrf-token', generateTokenHandler) app.post('/auth/login', loginHandler) app.post('/auth/logout', logoutHandler) app.use('/api', jwtMiddleware, apiRouter)