Options
Namespace: RA.Utilities.Api.Options;
The RA.Utilities.Api.Options; namespace contains configuration classes used to customize the behavior of the middlewares in this package. Each options class follows the ASP.NET Core Options pattern and is configured via the Action<T> delegate parameter on the corresponding Add* extension method.
🧩 Available Options Classes
- DefaultHeadersOptions — Configures the required headers and path exclusion for the
DefaultHeadersMiddleware. - HttpLoggingOptions — Configures path exclusion, header redaction, body size limits, and the slow-call warning threshold for the
LoggingMiddleware.
DefaultHeadersOptions
The DefaultHeadersOptions class provides configuration for the DefaultHeadersMiddleware. It allows you to specify which headers are required on incoming requests and which request paths should be excluded from header enforcement.
HttpLoggingOptions
The HttpLoggingOptions class provides configuration for the LoggingMiddleware. It allows you to control which requests are logged, which headers are redacted, how much of request/response bodies is captured, and when an additional slow-call warning is written.