Die Datei „api-service.js“ für HTTP-Anfragen erstellt. HTTP-POST-Anforderung erstellt, um die generierten Umschläge zurückzuweisen.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@using DigitalData.Core.API
|
||||
@using Newtonsoft.Json
|
||||
@using Newtonsoft.Json.Serialization
|
||||
@{
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
}
|
||||
@@ -27,19 +28,23 @@
|
||||
<script src="~/lib/pspdfkit/pspdfkit.js" asp-append-version="true"></script>
|
||||
<script src="~/lib/bootstrap-cookie-consent-settings-main/bootstrap-cookie-consent-settings.js" asp-append-version="true"></script>
|
||||
<script src="~/js/util.js" asp-append-version="true"></script>
|
||||
<script src="~/js/api.js" asp-append-version="true"></script>
|
||||
<script src="~/js/api-service.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
@{
|
||||
var lStrsJson = JsonConvert.SerializeObject(_localizer.ToDictionary()).TrySanitize(_sanitizer);
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||
};
|
||||
var lStrsJson = JsonConvert.SerializeObject(_localizer.ToDictionary(), settings).TrySanitize(_sanitizer);
|
||||
}
|
||||
<script nonce="@nonce">
|
||||
var localized = @Html.Raw(lStrsJson)
|
||||
</script>
|
||||
|
||||
<main role="main">
|
||||
<partial name="_CookieConsentPartial" />
|
||||
@RenderBody()
|
||||
</main>
|
||||
<script src="~/js/event-binder.js" asp-append-version="true"></script>
|
||||
@Html.AntiForgeryToken()
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user