CspViolationReportBody Class
The body of the reports of type csp-violation (https://w3c.github.io/webappsec-csp/#dictdef-cspviolationreportbody).
public sealed class CspViolationReportBody : ReportBody- Inheritance
ReportBodyCspViolationReportBody
Properties
| Name | Description |
|---|---|
| BlockedUrl | Gets the URL of the blocked resource, or a keyword (inline, eval...). |
| ColumnNumber | Gets the column of the script that caused the violation, or null when there is no source file. |
| Disposition | Gets the disposition of the violated policy. |
| DocumentUrl | Gets the URL of the document or worker whose policy is violated, without its credentials and its fragment. |
| EffectiveDirective | Gets the name of the directive whose enforcement caused the violation. |
| LineNumber | Gets the line of the script that caused the violation, or null when there is no source file. |
| OriginalPolicy | Gets the serialization of the violated policy. |
| Referrer | Gets the referrer of the document whose policy is violated. |
| Sample | Gets the sample of the code or the value that caused the violation. |
| SourceFile | Gets the URL of the script that caused the violation, or null. |
| StatusCode | Gets the HTTP status code of the response of the document or worker whose policy is violated. |
BlockedUrl
Report.csGets the URL of the blocked resource, or a keyword (inline, eval...).
public string? BlockedUrl { get; init; }Property value
See also
ColumnNumber
Report.csGets the column of the script that caused the violation, or null when there is no source file.
public uint? ColumnNumber { get; init; }Property value
See also
Disposition
Report.csGets the disposition of the violated policy.
public SecurityPolicyViolationEventDisposition Disposition { get; init; }DocumentUrl
Report.csGets the URL of the document or worker whose policy is violated, without its credentials and its fragment.
public string DocumentUrl { get; init; }Property value
See also
EffectiveDirective
Report.csGets the name of the directive whose enforcement caused the violation.
public string EffectiveDirective { get; init; }Property value
See also
LineNumber
Report.csGets the line of the script that caused the violation, or null when there is no source file.
public uint? LineNumber { get; init; }Property value
See also
OriginalPolicy
Report.csGets the serialization of the violated policy.
public string OriginalPolicy { get; init; }Property value
See also
Referrer
Report.csGets the referrer of the document whose policy is violated.
public string? Referrer { get; init; }Property value
See also
Sample
Report.csGets the sample of the code or the value that caused the violation.
public string? Sample { get; init; }SourceFile
Report.csGets the URL of the script that caused the violation, or null.
public string? SourceFile { get; init; }Property value
See also
StatusCode
Report.csGets the HTTP status code of the response of the document or worker whose policy is violated.
public ushort StatusCode { get; init; }