Index: lib/requestBlocker.js |
=================================================================== |
--- a/lib/requestBlocker.js |
+++ b/lib/requestBlocker.js |
@@ -147,17 +147,29 @@ |
FilterNotifier.on("subscription.removed", onFilterChange); |
FilterNotifier.on("subscription.updated", onFilterChange); |
FilterNotifier.on("subscription.disabled", arg => onFilterChange(arg, true)); |
FilterNotifier.on("filter.added", onFilterChange); |
FilterNotifier.on("filter.removed", onFilterChange); |
FilterNotifier.on("filter.disabled", arg => onFilterChange(arg, true)); |
FilterNotifier.on("load", onFilterChange); |
-port.on("request.websocket", (msg, sender) => |
+ |
+// Versions of Chrome < 58 do not support WebSockets since the release of |
Sebastian Noack
2017/03/28 13:48:08
On Chrome <58, the webRequest API doesn't intercep
Jon Sonesen
2017/03/28 19:18:30
Sorry, thank you for clarifying the comments here.
|
+// the 58 beta we are using this check to disable the CSP injection workaround. |
+// |
+// SharedWorkers will not be blocked by this workaround being disabled a |
Sebastian Noack
2017/03/28 13:48:08
WebSocket connections opened by SharedWorkers are
Sebastian Noack
2017/03/28 14:33:44
Nevermind. This paragraph should rather just go aw
Jon Sonesen
2017/03/28 19:18:30
Acknowledged.
|
+// fix would be if the browser associated the SharedWorker tabId/frameId with |
+// the document that caused it to be created. |
+// |
+// Chromium ticket has been filed: https://crbug.com/705931 |
+if (("WEBSOCKET" in chrome.webRequest.ResourceType)) |
{ |
- return ext.webRequest.onBeforeRequest._dispatch( |
- new URL(msg.url), |
- "WEBSOCKET", |
- sender.page, |
- sender.frame |
- ).indexOf(false) != -1; |
-}); |
+ port.on("request.websocket", (msg, sender) => |
+ { |
+ return ext.webRequest.onBeforeRequest._dispatch( |
+ new URL(msg.url), |
+ "WEBSOCKET", |
+ sender.page, |
+ sender.frame |
+ ).indexOf(false) != -1; |
+ }); |
+} |