mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-13 02:37:32 +09:00
parent
ec4bbcb6f1
commit
f1f9dde29e
4 changed files with 17 additions and 2 deletions
|
|
@ -827,6 +827,16 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource,
|
|||
{
|
||||
NS_ENSURE_ARG_MAX(aViolatedPolicyIndex, mPolicies.Length() - 1);
|
||||
|
||||
if (!CSPService::sCSPReportingEnabled) {
|
||||
// Reporting is pref-disabled. Don't do any actual work and return success.
|
||||
nsContentUtils::ReportToConsoleNonLocalized(
|
||||
NS_LITERAL_STRING("CSP violation report not sent: reports have been disabled contrary to spec."),
|
||||
nsIScriptError::warningFlag,
|
||||
NS_LITERAL_CSTRING("Content Security Policy"),
|
||||
nullptr);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
dom::CSPReport report;
|
||||
nsresult rv;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue