MapRouteOptions record
Options for mapping a route, including pattern, HTTP verbs, script code, authorization, and metadata.
public record MapRouteOptions
Public Members
| name | description |
|---|---|
| MapRouteOptions() | The default constructor. |
| AllowAnonymous { get; set; } | If true, allows anonymous access to this route. |
| CorsPolicyName { get; set; } | Name of the CORS policy to apply, if any. |
| DisableAntiforgery { get; set; } | If true, disables antiforgery protection for this route. |
| DisableResponseCompression { get; set; } | If true, disables response compression for this route. |
| Endpoints { get; set; } | Endpoints to bind the route to, if any. |
| HttpVerbs { get; set; } | The HTTP verbs (methods) that this route responds to. |
| OpenAPI { get; set; } | OpenAPI metadata for this route. |
| Pattern { get; set; } | The route pattern to match for this option. |
| RateLimitPolicyName { get; set; } | The name of the rate limit policy to apply to this route, if any. |
| RequirePolicies { get; set; } | Authorization policy names required for this route. |
| RequireSchemes { get; set; } | Authorization Scheme names required for this route. |
| ScriptCode { get; set; } | Script code and language options for this route. |
| ShortCircuit { get; set; } | If true, short-circuits the pipeline after this route. |
| ShortCircuitStatusCode { get; set; } | Status code to return if short-circuiting the pipeline after this route. |
| ThrowOnDuplicate { get; set; } | If true, throws an exception on duplicate routes. |
See Also
- namespace Kestrun.Hosting.Options