コード例 #1
0
 internal CspOptions Build()
 {
     this.options.Defaults = this.Defaults.Sources;
     this.options.Scripts  = this.Scripts.Sources;
     this.options.Styles   = this.Styles.Sources;
     this.options.Images   = this.Images.Sources;
     this.options.Fonts    = this.Fonts.Sources;
     this.options.Media    = this.Media.Sources;
     return(this.options);
 }
コード例 #2
0
 /// <summary>
 /// Enhance a CspDirectiveBuilder with methods that support "src" directives.
 /// </summary>
 /// <param name="cspDirectiveBuilder">The internal directive builder.</param>
 /// <param name="nonce">The nonce generated by the server</param>
 public static CspSourceDirectiveBuilder ForSources(this CspDirectiveBuilder cspDirectiveBuilder, string nonce)
 {
     return(new CspSourceDirectiveBuilder(cspDirectiveBuilder, nonce));
 }
コード例 #3
0
 internal CspSourceDirectiveBuilder(CspDirectiveBuilder internalBuilder, string nonce)
 {
     _internalBuilder = internalBuilder;
     _nonce           = nonce;
 }