Nucleus .Net Core CMS

HtmlHelpers.AddAllowedSourceHtmlHelper Class

Namespace: Nucleus.ViewFeatures.HtmlHelpers
Assembly: Nucleus.ViewFeatures.dll
Html helper used to add allowed sources. Allowed sources are added to the content security policy.
AddAllowedSource (IHtmlHelper htmlHelper, AllowedSourceTypes type, String url)
Add an allowed resource source. Allowed sources are used to configure the Content Security Policy (CSP) for the page.
AddAllowedSource (HttpContext context, AllowedSourceTypes type, String url)
Add an allowed resource source. Allowed sources are used to configure the Content Security Policy (CSP) for the page.
Remarks
This overload is intended for use by extensions which need to add allowed sources from code other than a view.
AddAllowedSources (IHtmlHelper htmlHelper, AllowedSourceTypes type, IEnumerable<String> sourceUrls)
Add multiple allowed resource sources. Allowed sources are used to configure the Content Security Policy (CSP) for the page.
Parameters
Name Type
htmlHelper Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
type Nucleus.Abstractions.Models.ClientResources.AllowedSource.AllowedSourceTypes
sourceUrls System.Collections.Generic.IEnumerable<System.String>
AddAllowedSources (HttpContext context, AllowedSourceTypes type, IEnumerable<String> sourceUrls)
Add multiple allowed resource sources. Allowed sources are used to configure the Content Security Policy (CSP) for the page.
Parameters
Name Type
context Microsoft.AspNetCore.Http.HttpContext
type Nucleus.Abstractions.Models.ClientResources.AllowedSource.AllowedSourceTypes
sourceUrls System.Collections.Generic.IEnumerable<System.String>
Remarks
This overload is intended for use by extensions which need to add allowed sources from code other than a view.