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

Side by Side Diff: lib/csp.js

Issue 29367316: Issue 4722 - Drop support for Chrome 41 - 48 (Closed)
Patch Set: Removed some legacy code Created Dec. 13, 2016, 1:51 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 19 matching lines...) Expand all
30 { 30 {
31 details.responseHeaders.push({ 31 details.responseHeaders.push({
32 name: "Content-Security-Policy", 32 name: "Content-Security-Policy",
33 // We're blocking WebSockets here by adding a connect-src restriction 33 // We're blocking WebSockets here by adding a connect-src restriction
34 // since the Chrome extension API does not allow us to intercept them. 34 // since the Chrome extension API does not allow us to intercept them.
35 // https://bugs.chromium.org/p/chromium/issues/detail?id=129353 35 // https://bugs.chromium.org/p/chromium/issues/detail?id=129353
36 // 36 //
37 // We also need the frame-src and child-src restrictions since CSPs are 37 // We also need the frame-src and child-src restrictions since CSPs are
38 // not inherited from the parent for documents with data: and blob: URLs. 38 // not inherited from the parent for documents with data: and blob: URLs.
39 // https://bugs.chromium.org/p/chromium/issues/detail?id=513860 39 // https://bugs.chromium.org/p/chromium/issues/detail?id=513860
40 // 40 value: "connect-src http:; frame-src http:; child-src http:; object-src ht tp:"
41 // As of Chrome 49 "http:" also includes "https:" implictly. We specify
42 // both here for compatibility with earlier versions of Chrome.
43 // https://www.chromestatus.com/feature/6653486812889088
Wladimir Palant 2016/12/13 14:15:02 This comment still adds some value, http: also inc
kzar 2016/12/13 15:05:40 Done.
44 value: "connect-src http: https:; frame-src http: https:; " +
Sebastian Noack 2016/12/13 14:35:39 It seems we don't support any Chrome version anymo
kzar 2016/12/13 15:05:40 Done.
45 "child-src http: https:; object-src http: https:"
46 }); 41 });
47 return {responseHeaders: details.responseHeaders}; 42 return {responseHeaders: details.responseHeaders};
48 } 43 }
49 }, { 44 }, {
50 urls: ["http://*/*", "https://*/*"], 45 urls: ["http://*/*", "https://*/*"],
51 types: ["main_frame", "sub_frame"] 46 types: ["main_frame", "sub_frame"]
52 }, ["blocking", "responseHeaders"]); 47 }, ["blocking", "responseHeaders"]);
OLDNEW

Powered by Google App Engine
This is Rietveld