mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-14 08:15:03 +12:00
this fixes #490
This commit is contained in:
parent
5a422a681d
commit
e90bc19420
|
@ -772,6 +772,8 @@ var httpObserver = {
|
|||
ABORT: Components.results.NS_BINDING_ABORTED,
|
||||
ACCEPT: Components.results.NS_SUCCEEDED,
|
||||
MAIN_FRAME: Ci.nsIContentPolicy.TYPE_DOCUMENT,
|
||||
VALID_CSP_TARGETS: 1 << Ci.nsIContentPolicy.TYPE_DOCUMENT |
|
||||
1 << Ci.nsIContentPolicy.TYPE_SUBDOCUMENT,
|
||||
typeMap: {
|
||||
2: 'script',
|
||||
3: 'image',
|
||||
|
@ -921,7 +923,11 @@ var httpObserver = {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( !channelData || channelData[0] !== this.MAIN_FRAME ) {
|
||||
if ( !channelData ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 1 << channelData[0] & this.VALID_CSP_TARGETS === 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue