Newer Version Available

This content describes an older version of this product. View Latest

CspViolation

Represents a blocked resource request due to content security policy (CSP) directives on system-defined trusted URLs. This object is available in API version 60.0, and was removed in API version 61.0. In API version 61.0 and later, use the BrowserPolicyViolation object instead.

In API version 61.0 and later, use the BrowserPolicyViolation object to view resource requests that are blocked due to your content security policy (CSP) directives.

Note

Supported Calls

delete(), describeSObjects(), query(), retrieve(), search()

Special Access Rules

Only users with the Customize Application and Modify All Data permissions can access this object.

Fields

Field Details
BlockedUrl
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The URL associated with the request, without the path. For example, if a blocked requested resource is an image with the URL https://www.example.com/images/image1.png, the BlockedUrl is https://www.example.com.
DeveloperName
Type
string
Properties
Filter, Group, Sort
Description
The developer name of the CSP violation.
Only users with View DeveloperName or View Setup and Configuration permission can view, group, sort, and filter this field.
IsConnectSrcViolated
Type
boolean
Properties
Filter, Group, Sort
Description
Reserved for future use.
IsFontSrcViolated
Type
boolean
Properties
Filter, Group, Sort
Description
Indicates that for this blocked event, at least one request to load a font from the URL was blocked (true).
When IsFontSrcViolated is false, this blocked event is unrelated to a request to load a font from the BlockedUrl within the ViolationContext.
The default value is false.
IsFrameSrcViolated
Type
boolean
Properties
Filter, Group, Sort
Description
Indicates that for this blocked event, at least one request to load content in an iFrame that originated from the URL was blocked (true).
When IsFrameSrcViolated is false, this blocked event is unrelated to a request to load content in an iFrame that originated from the BlockedUrl within the ViolationContext.
The default value is false.
IsImageSrcViolated
Type
boolean
Properties
Filter, Group, Sort
Description
Indicates that for this blocked event, at least one request to load an image file from the URL was blocked (true).
When IsFontSrcViolated is false, this blocked event is unrelated to a request to load an image file from the BlockedUrl within the ViolationContext.
The default value is false.
IsMediaSrcViolated
Type
boolean
Properties
Filter, Group, Sort
Description
Reserved for future use.
IsStyleSrcViolated
Type
boolean
Properties
Filter, Group, Sort
Description
Reserved for future use.
Language
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The language for the blocked request.
MasterLabel
Type
string
Properties
Filter, Group, Sort
Description
Master label for this CSP violation.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
Namespace prefix for this CSP violation.
ViolationContext
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The content security policy (CSP) context for the request. The context controls which pages can load content from a CspTrustedSite.
Possible values are
  • COMMUNITIES—The blocked request is related to an Experience Builder site.
  • LIGHTNING—The blocked request is related to a Lightning Experience page.