CookieRedirectEndpointConventionBuilderExtensions.DisableCookieRedirect<TBuilder> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies that cookie-based authentication redirects are disabled for an endpoint using IDisableCookieRedirectMetadata. When present and not overridden by AllowCookieRedirect<TBuilder>(TBuilder) or IAllowCookieRedirectMetadata, the cookie authentication handler will prefer using 401 and 403 status codes over redirecting to the login or access denied paths.
public static TBuilder DisableCookieRedirect<TBuilder>(this TBuilder builder) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member DisableCookieRedirect : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function DisableCookieRedirect(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder) As TBuilder
Type Parameters
- TBuilder
The type of endpoint convention builder.
Parameters
- builder
- TBuilder
The endpoint convention builder.
Returns
The original convention builder parameter.