KestrunSecurityMiddlewareExtensions.AddAntiforgery method (1 of 2)
Adds antiforgery protection to the application.
public static KestrunHost AddAntiforgery(this KestrunHost host,
Action<AntiforgeryOptions>? setupAction = null)
| parameter | description |
|---|---|
| host | The KestrunHost instance to configure. |
| setupAction | An optional action to configure the antiforgery options. |
Return Value
The current KestrunHost instance.
See Also
- class KestrunHost
- class KestrunSecurityMiddlewareExtensions
- namespace Kestrun.Hosting
KestrunSecurityMiddlewareExtensions.AddAntiforgery method (2 of 2)
Adds antiforgery protection to the application. This overload allows you to specify configuration options.
public static KestrunHost AddAntiforgery(this KestrunHost host, AntiforgeryOptions? options)
| parameter | description |
|---|---|
| host | The KestrunHost instance to configure. |
| options | The antiforgery options to configure. |
Return Value
The current KestrunHost instance.
See Also
- class KestrunHost
- class KestrunSecurityMiddlewareExtensions
- namespace Kestrun.Hosting