httpCorrelation
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
httpCorrelation(
options?):HttpMiddleware
Defined in: middlewares/http-correlation.middleware.ts:40
An HTTP middleware that takes the correlation id from the incoming request header and runs the rest of the request with it (runWithCorrelationId), so pipelines that the request starts take it. It echoes the id on the response header.
The header name defaults to x-correlation-id. If header is omitted or is any
non-string value (including false), the default header is used.
An incoming id that the rules configureCorrelation sets reject (by default, longer
than 128 characters or outside the default character set) is replaced by a local id
and reported to onRejected with the source 'http'. acceptIncoming,
trimIncoming, maxLength and validateIncoming adjust that policy for this
middleware. None of them lets through an id that is not printable ASCII or that starts
or ends with a space.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Throws
Section titled “Throws”TypeError when header is not a valid HTTP field name, or maxLength is not
a positive safe integer.
Example
Section titled “Example”Express