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

Unified Diff: lib/csp.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Patch Set: Make copyProperties more generic Created June 21, 2017, 11:34 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ext/common.js ('K') | « inject.preload.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/csp.js
===================================================================
--- a/lib/csp.js
+++ b/lib/csp.js
@@ -19,8 +19,10 @@
// Before Chrome 58, the webRequest API did not intercept WebSocket
kzar 2017/06/22 11:23:38 Maybe reword something like this? The webRequest
Oleksandr 2017/06/22 13:34:59 Done.
// connections (see https://crbug.com/129353). Hence we inject CSP headers,
-// below, as a workaround.
-if (!("WEBSOCKET" in chrome.webRequest.ResourceType))
+// below, as a workaround. Edge does not intercept WebSocket requests either:
+// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10297376/
+if (!chrome.webRequest.ResourceType ||
+ !("WEBSOCKET" in chrome.webRequest.ResourceType))
{
const {defaultMatcher} = require("matcher");
const {BlockingFilter, RegExpFilter} = require("filterClasses");
« ext/common.js ('K') | « inject.preload.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld