1111
This commit is contained in:
7
backend/src/middleware/request-id.ts
Normal file
7
backend/src/middleware/request-id.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { RequestHandler } from "express";
|
||||
import crypto from "node:crypto";
|
||||
|
||||
export const requestIdMiddleware: RequestHandler = (req, _res, next) => {
|
||||
req.requestId = crypto.randomUUID();
|
||||
next();
|
||||
};
|
||||
Reference in New Issue
Block a user