Search Results for

    Show / Hide Table of Contents

    Class MiddlewareExtensions

    Inheritance
    object
    MiddlewareExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastEndpoints
    Assembly: FastEndpoints.dll
    Syntax
    public static class MiddlewareExtensions

    Methods

    UseAntiforgeryFE(IApplicationBuilder, Func<HttpContext, bool>?, string[]?)

    enable anti-forgery token verification middleware. make sure to also add the anti-forgery services with builder.Services.AddAntiForgery()

    Declaration
    public static IApplicationBuilder UseAntiforgeryFE(this IApplicationBuilder app, Func<HttpContext, bool>? skipRequestFilter = null, string[]? additionalContentTypes = null)
    Parameters
    Type Name Description
    IApplicationBuilder app
    Func<HttpContext, bool> skipRequestFilter

    an optional predicate which can be used to skip anti-forgery checks for requests that satisfy a given condition. provide a function that returns true for requests that you'd want the anti-forgery middleware to skip processing.

    string[] additionalContentTypes

    optional array of additional content-types to enforce antiforgery checks for (if the endpoint has enabled antiforgery).

    Returns
    Type Description
    IApplicationBuilder
    In this article
    Back to top Developed by Đĵ ΝιΓΞΗΛψΚ and contributors / Licensed under MIT / Website generated by DocFX