Add support for excluding paths from correlation ID processing
This commit introduces the ability to specify paths that should be excluded from correlation ID processing within the CorrelationId middleware. This feature allows users to configure the middleware to skip applying correlation IDs to requests that match defined patterns, which is particularly useful for health checks and other system routes that do not require tracking.
Changes include:
Updated CorrelationIdOptions to include ExcludedPaths list.
Modified CorrelationIdMiddleware to check and skip processing for paths listed in ExcludedPaths.
Added unit tests to verify that the middleware correctly skips processing for excluded paths and continues to function for non-excluded paths.
Add support for excluding paths from correlation ID processing
This commit introduces the ability to specify paths that should be excluded from correlation ID processing within the CorrelationId middleware. This feature allows users to configure the middleware to skip applying correlation IDs to requests that match defined patterns, which is particularly useful for health checks and other system routes that do not require tracking.
Changes include:
CorrelationIdOptions
to includeExcludedPaths
list.CorrelationIdMiddleware
to check and skip processing for paths listed inExcludedPaths
.