bcae59626f
Build & Push Docker Image / build (push) Successful in 2m16s
- Synchronizer token stored in session; GET /auth/csrf to obtain it - csrfProtection middleware requires X-CSRF-Token on non-safe methods - customFetch injects the header via setCsrfTokenGetter - toolrate boot loads token; reload after local login (session regenerate) - OpenAPI GET /auth/csrf + CsrfToken schema, orval regenerated
28 lines
748 B
TypeScript
28 lines
748 B
TypeScript
import { Router, type IRouter } from "express";
|
|
import healthRouter from "./health";
|
|
import toolsRouter from "./tools";
|
|
import ratingsRouter from "./ratings";
|
|
import analyticsRouter from "./analytics";
|
|
import authRouter from "./auth";
|
|
import usersRouter from "./users";
|
|
import auditRouter from "./audit";
|
|
import costsRouter from "./costs";
|
|
import adminRouter from "./admin";
|
|
import { csrfProtection } from "../middleware/csrf";
|
|
|
|
const router: IRouter = Router();
|
|
|
|
router.use(csrfProtection);
|
|
|
|
router.use(authRouter);
|
|
router.use(healthRouter);
|
|
router.use(toolsRouter);
|
|
router.use(ratingsRouter);
|
|
router.use(costsRouter);
|
|
router.use(adminRouter);
|
|
router.use(analyticsRouter);
|
|
router.use(usersRouter);
|
|
router.use(auditRouter);
|
|
|
|
export default router;
|