tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CSPReport.webidl (997B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 /**
      6  * This dictionary holds the parameters used to send
      7  * CSP reports in JSON format.
      8  *
      9  * Based on https://w3c.github.io/webappsec-csp/#deprecated-serialize-violation
     10  */
     11 
     12 dictionary CSPReportProperties {
     13  DOMString document-uri = "";
     14  DOMString referrer = "";
     15  DOMString blocked-uri = "";
     16  DOMString effective-directive = "";
     17  DOMString violated-directive = "";
     18  DOMString original-policy= "";
     19  SecurityPolicyViolationEventDisposition disposition = "report";
     20  long status-code = 0;
     21 
     22  UTF8String source-file;
     23  DOMString script-sample;
     24  long line-number;
     25  long column-number;
     26 };
     27 
     28 [GenerateToJSON]
     29 dictionary CSPReport {
     30  // We always want to have a "csp-report" property, so just pre-initialize it
     31  // to an empty dictionary..
     32  CSPReportProperties csp-report = {};
     33 };