Class FailurePointsMiddlewareExtensions
Inherited Members
Namespace: Coree.NETASP.Middleware
Assembly: Coree.NETASP.dll
Syntax
public static class FailurePointsMiddlewareExtensions
Methods
| Edit this page View SourceAddFailurePoints(IServiceCollection, string[]?, int)
Adds and configures the HostNameFilteringMiddleware options.
Declaration
public static IServiceCollection AddFailurePoints(this IServiceCollection services, string[]? whitelist = null, int disallowedStatusCode = 400)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection to add services to. This collection will be enhanced by the configuration of the HostNameFilteringMiddleware. |
string[] | whitelist | An array of strings specifying the hostnames that should be allowed by the middleware. This list directly populates the Whitelist property of the HostNameFilterOptions. |
int | disallowedStatusCode |
Returns
Type | Description |
---|---|
IServiceCollection | The IServiceCollection so that additional calls can be chained, enabling fluent configuration. |