mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-04 18:19:38 +02:00
fix #2050
This commit is contained in:
parent
e436a9be93
commit
751e34f3ce
@ -451,6 +451,14 @@ var processCSP = function(details, pageStore, context) {
|
|||||||
µb.staticNetFilteringEngine.matchStringExactType(context, requestURL, 'websocket');
|
µb.staticNetFilteringEngine.matchStringExactType(context, requestURL, 'websocket');
|
||||||
var websocketResult = µb.staticNetFilteringEngine.toResultString(loggerEnabled),
|
var websocketResult = µb.staticNetFilteringEngine.toResultString(loggerEnabled),
|
||||||
blockWebsocket = µb.isBlockResult(websocketResult);
|
blockWebsocket = µb.isBlockResult(websocketResult);
|
||||||
|
// https://github.com/gorhill/uBlock/issues/2050
|
||||||
|
// Blanket-blocking websockets is exceptional, so we test whether the
|
||||||
|
// page is whitelisted if and only if there is a hit against a websocket
|
||||||
|
// filter.
|
||||||
|
if ( blockWebsocket && pageStore.getNetFilteringSwitch() === false ) {
|
||||||
|
websocketResult = '';
|
||||||
|
blockWebsocket = false;
|
||||||
|
}
|
||||||
|
|
||||||
var headersChanged = false;
|
var headersChanged = false;
|
||||||
if ( blockInlineScript || blockWebsocket ) {
|
if ( blockInlineScript || blockWebsocket ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user