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. |
Arguments { get; set; } | Additional metadata for the route, represented as key-value pairs. |
Code { get; set; } | The script code to execute for 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. |
ExtraImports { get; set; } | Additional import namespaces required for the script code. |
ExtraRefs { get; set; } | Additional assembly references required for the script code. |
HttpVerbs { get; set; } | The HTTP verbs (methods) that this route responds to. |
Language { get; set; } | The scripting language used for the route’s code. |
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. |
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. |
record OpenAPIMetadata | Metadata for OpenAPI documentation related to the route. |
See Also
- namespace Kestrun.Hosting.Options