Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1429 Add WebSockets and bump mininum version numbers #234

Merged
merged 10 commits into from Nov 6, 2018

Don't listen to WebSockets on Edge, where they aren't supported

  • Loading branch information
IAmThePan committed Nov 5, 2018
commit dc4ce3e8ce123c1e69715d787aa60b4d79e123ce
@@ -1419,9 +1419,12 @@ function initializePopup() {
* @memberOf Background
*/
function addCommonGhosteryAndAntitrackingListeners() {
chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, {
urls: ['http://*/*', 'https://*/*', 'ws://*/*', 'wss://*/*']
}, ['blocking']);
// Edge doesn't support WebSockets
const urls = ['http://*/*', 'https://*/*'];
if (!IS_EDGE) {
urls.push('ws://*/*', 'wss://*/*');
}
chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, { urls }, ['blocking']);
This conversation was marked as resolved by jsignanini

This comment has been minimized.

@jsignanini

jsignanini Nov 6, 2018
Member

@christophertino is there a reason why we don't also add these to the onHeadersReceived listener?

chrome.webRequest.onHeadersReceived.addListener(onHeadersReceived, {
urls: ['http://*/*', 'https://*/*']
}, ['responseHeaders']);
ProTip! Use n and p to navigate between commits in a pull request.