Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/csp.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Rebased Created March 23, 2017, 6:46 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/compat.js ('k') | lib/devtools.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 28 matching lines...) Expand all
39 // 39 //
40 // We also need the frame-src and object-src restrictions since CSPs are 40 // We also need the frame-src and object-src restrictions since CSPs are
41 // not inherited from the parent for documents with data: and blob: URLs. 41 // not inherited from the parent for documents with data: and blob: URLs.
42 // https://bugs.chromium.org/p/chromium/issues/detail?id=513860 42 // https://bugs.chromium.org/p/chromium/issues/detail?id=513860
43 // 43 //
44 // We must use the deprecated child-src directive instead of worker-src 44 // We must use the deprecated child-src directive instead of worker-src
45 // since that's not supported yet (as of Chrome 56.) 45 // since that's not supported yet (as of Chrome 56.)
46 // 46 //
47 // "http:" also includes "https:" implictly. 47 // "http:" also includes "https:" implictly.
48 // https://www.chromestatus.com/feature/6653486812889088 48 // https://www.chromestatus.com/feature/6653486812889088
49 value: "connect-src http:; child-src http:; frame-src http:; object-src ht tp:" 49 value: "connect-src http:; child-src http:; " +
50 "frame-src http:; object-src http:"
50 }); 51 });
51 return {responseHeaders: details.responseHeaders}; 52 return {responseHeaders: details.responseHeaders};
52 } 53 }
53 }, { 54 }, {
54 urls: ["http://*/*", "https://*/*"], 55 urls: ["http://*/*", "https://*/*"],
55 // We must also intercept script requests since otherwise Web Workers can 56 // We must also intercept script requests since otherwise Web Workers can
56 // be abused to execute scripts for which our Content Security Policy 57 // be abused to execute scripts for which our Content Security Policy
57 // won't be injected. 58 // won't be injected.
58 // https://github.com/gorhill/uBO-Extra/issues/19 59 // https://github.com/gorhill/uBO-Extra/issues/19
59 types: ["main_frame", "sub_frame", "script"] 60 types: ["main_frame", "sub_frame", "script"]
60 }, ["blocking", "responseHeaders"]); 61 }, ["blocking", "responseHeaders"]);
OLDNEW
« no previous file with comments | « lib/compat.js ('k') | lib/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld