Beispiel #1
0
        private string GeneratePolicyOptions(IContentSecurityPolicyOptions options)
        {
            string result = String.Empty;

            if (options.None)
            {
                result = None;
            }
            else
            {
                if (options.All)
                {
                    result += All;
                }
                if (options.Data)
                {
                    result += Data;
                }
                if (options.Self)
                {
                    result += Self;
                }
                if (options.UnsafeInline)
                {
                    result += UnsafeInline;
                }
                if (options.UnsafeEval)
                {
                    result += UnsafeEval;
                }
            }
            return(result);
        }
Beispiel #2
0
 public StyleContentSecurityPolicySource(IContentSecurityPolicyOptions options, string hostnames) : base(_name, options, hostnames)
 {
 }
 public ContentSecurityPolicySource(string name, IContentSecurityPolicyOptions options, string hostnames)
 {
     this._name     = name;
     this.Hostnames = hostnames;
     this.Options   = options;
 }
 public FrameAncestorContentSecurityPolicySource(IContentSecurityPolicyOptions options, string hostnames) : base(_name, options, hostnames)
 {
 }