Language

ICsrfProtection Interface

Definition

Provides cross-origin request protection based on Fetch Metadata headers (Sec-Fetch-Site) and Origin header validation. This is a lightweight defense against CSRF attacks that does not require tokens or DataProtection.

public interface ICsrfProtection
type ICsrfProtection = interface
Public Interface ICsrfProtection

Methods

Name Description
ValidateAsync(HttpContext)

Validates whether the request should be allowed based on its origin.

Applies to