UNPKG

@unito/integration-sdk

Version:

Integration SDK

7 lines (6 loc) 220 B
import crypto from 'crypto'; function extractCorrelationId(req, res, next) { res.locals.correlationId = req.header('X-Unito-Correlation-Id') ?? crypto.randomUUID(); next(); } export default extractCorrelationId;