UNPKG

@evanion/nestjs-correlation-id

Version:

Transparently forward or add correlation id to all requests

11 lines (10 loc) 528 B
import { NestMiddleware } from '@nestjs/common'; import { Request, Response } from 'express'; import { CorrelationService } from './correlation.service'; import { CorrelationConfig } from './interfaces/correlation-config.interface'; export declare class CorrelationIdMiddleware implements NestMiddleware { private correlationService; private correlationConfig; constructor(correlationService: CorrelationService, correlationConfig: CorrelationConfig); use(req: Request, res: Response, next: () => void): void; }