public static ContentSecurityPolicyHeader AddDirective(this ContentSecurityPolicyHeader header, ManifestSourceDirective directive) { return(header.AddDirective(directive)); }
public static ContentSecurityPolicyHeader AddDefaultContentSecurityPolicyDirectives(this ContentSecurityPolicyHeader header) { return(header .AddDirective(new DefaultSourceDirective(Constants.NoneKeyword)) .AddDirective(new ScriptSourceDirective(Constants.SelfKeyword)) .AddDirective(new ConnectSourceDirective(Constants.SelfKeyword)) .AddDirective(new ImageSourceDirective(Constants.SelfKeyword)) .AddDirective(new StyleSourceDirective(Constants.SelfKeyword))); }
public static ContentSecurityPolicyHeader AddDirective(this ContentSecurityPolicyHeader header, FormActionDirective directive) { return(header.AddDirective(directive)); }
public static ContentSecurityPolicyHeader AddDirective(this ContentSecurityPolicyHeader header, FrameAncestorsDirective directive) { return(header.AddDirective(directive)); }
public static ContentSecurityPolicyHeader AddScriptNonce(this ContentSecurityPolicyHeader header, Func <string> nonce) { return(header.AddDirective(new NonceDirective(nonce))); }
public static ContentSecurityPolicyHeader AddScriptSha256(this ContentSecurityPolicyHeader header, Func <string> sha) { return(header.AddDirective(new Sha256Directive(sha))); }
public static ContentSecurityPolicyHeader AllowUnsafeEvalScripts(this ContentSecurityPolicyHeader header) { return(header.AddDirective(new ScriptSourceDirective(Constants.UnsafeEvalKeyword))); }
public static ContentSecurityPolicyHeader SetStrictDynamic(this ContentSecurityPolicyHeader header) { return(header.AddDirective(new ScriptSourceDirective(Constants.StrictDynamicKeyword))); }
public static ContentSecurityPolicyHeader AllowUnsafeInlineStyles(this ContentSecurityPolicyHeader header) { return(header.AddDirective(new StyleSourceDirective(Constants.UnsafeInlineKeyword))); }
public static ContentSecurityPolicyHeader UpgradeInsecureRequests(this ContentSecurityPolicyHeader header) { return(header.AddDirective(new UpgradeInsecureRequestsDirective())); }
public static ContentSecurityPolicyHeader AllowManifestSources(this ContentSecurityPolicyHeader header, params string[] sources) { return(header.AddDirective(new ManifestSourceDirective(sources))); }
public static ContentSecurityPolicyHeader AllowFrameAncestors(this ContentSecurityPolicyHeader header, params string[] sources) { return(header.AddDirective(new FrameAncestorsDirective(sources))); }
public static ContentSecurityPolicyHeader SetBaseUris(this ContentSecurityPolicyHeader header, params string[] uris) { return(header.AddDirective(new BaseUriDirective(uris))); }