ISecurityHeadersBuilder AddContentSecurityPolicyButTrust( IEnumerable<string> mediaSites, IEnumerable<string> scriptsSites, IEnumerable<string> imagesSites, IEnumerable<string> cssSites, IEnumerable<string> defaultSites, bool trustSelf, bool allowObjectSource, bool allowInline, FramesPolicy frames, bool reportOnly )
Parameters
- mediaSites
- The media sites.
- scriptsSites
- The scripts sites.
- imagesSites
- The images sites.
- cssSites
- The CSS sites.
- defaultSites
- domains that are trusted by default
- trustSelf
- Indicates that you trust the hosting site (default)
- allowObjectSource
- if true it may merge 'self' if trustSelf is set and default sites are populated, else it will be disabled via policy
- allowInline
- if set to
true
then allow the in-line use of CSS JavaScript. - frames
- The frames.
- reportOnly
- if true it will only report violations in the browser, the firewall however will detect the violation and will trigger the appropriate firewall rules for CSP violators as well as flag the user as such
Return Value
SecurityHeadersBuilder.