7 lines
350 B
Plaintext
7 lines
350 B
Plaintext
@using Microsoft.AspNetCore.Antiforgery
|
|
@inject Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor
|
|
@inject IAntiforgery antiforgery
|
|
@{
|
|
var token = antiforgery.GetAndStoreTokens(httpContextAccessor.HttpContext).RequestToken;
|
|
}
|
|
<input type="hidden" value="@token" name="__RequestVerificationToken" id="__RequestVerificationToken" /> |