@@ -430,28 +430,29 @@ var processCSP = function(pageStore, details) {
430
430
loggerEnabled = µb . logger . isEnabled ( ) ;
431
431
432
432
var context = pageStore . createContextFromPage ( ) ;
433
- context . requestURL = requestURL ;
434
433
context . requestHostname = µb . URI . hostnameFromURI ( requestURL ) ;
435
434
if ( details . type !== 'main_frame' ) {
436
435
context . pageHostname = context . pageDomain = context . requestHostname ;
437
436
}
438
437
439
- var inlineScriptResult , blockInlineScript ;
438
+ var inlineScriptResult , blockInlineScript ,
439
+ workerResult , blockWorker ;
440
440
if ( details . type !== 'script' ) {
441
441
context . requestType = 'inline-script' ;
442
+ context . requestURL = requestURL ;
442
443
inlineScriptResult = pageStore . filterRequestNoCache ( context ) ;
443
444
blockInlineScript = µb . isBlockResult ( inlineScriptResult ) ;
445
+ // https://github.com/gorhill/uBlock/issues/2360
446
+ context . requestType = 'script' ;
447
+ context . requestURL = 'blob:' ;
448
+ workerResult = pageStore . filterRequestNoCache ( context ) ;
449
+ blockWorker = µb . isBlockResult ( workerResult ) ;
444
450
}
445
451
446
452
µb . staticNetFilteringEngine . matchStringExactType ( context , requestURL , 'websocket' ) ;
447
453
var websocketResult = µb . staticNetFilteringEngine . toResultString ( loggerEnabled ) ,
448
454
blockWebsocket = µb . isBlockResult ( websocketResult ) ;
449
455
450
- // https://github.com/gorhill/uBlock/issues/2360
451
- µb . staticNetFilteringEngine . matchStringExactType ( context , 'blob:' , 'script' ) ;
452
- var workerResult = µb . staticNetFilteringEngine . toResultString ( loggerEnabled ) ,
453
- blockWorker = µb . isBlockResult ( workerResult ) ;
454
-
455
456
var headersChanged ;
456
457
if ( blockInlineScript || blockWebsocket || blockWorker ) {
457
458
headersChanged = foilWithCSP (
0 commit comments