Dela via


CookiePolicyMiddleware Class

Definition

Initializes a new instance of CookiePolicyMiddleware.

public ref class CookiePolicyMiddleware
public class CookiePolicyMiddleware
type CookiePolicyMiddleware = class
Public Class CookiePolicyMiddleware
Inheritance
CookiePolicyMiddleware

Remarks

When using CookieOptions to configure cookies, note that a CookieOptions instance is intended to govern the behavior of an individual cookie. Reusing the same CookieOptions instance across multiple cookies can lead to unintended consequences, such as modifications affecting multiple cookies. We recommend instantiating a new CookieOptions object for each cookie to ensure that the configuration is applied independently.

Constructors

CookiePolicyMiddleware(RequestDelegate, IOptions<CookiePolicyOptions>, ILoggerFactory)

Initializes a new instance of CookiePolicyMiddleware.

CookiePolicyMiddleware(RequestDelegate, IOptions<CookiePolicyOptions>)

Initializes a new instance of CookiePolicyMiddleware.

Properties

Options

Gets or sets the CookiePolicyOptions.

Methods

Invoke(HttpContext)

Invokes the middleware.

Applies to