Skip to content

Commit e2152e8

Browse files
author
p01
committed
WIP of DFL-3307, highlight cross origin resources
1 parent f020c60 commit e2152e8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/resource-manager/resource_service.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,17 @@ cls.ResourceContext = function(data)
381381

382382
frame.groups[type].push( res.id );
383383
this.resourcesUrlDict[ res.url ] = res.id;
384+
385+
// WIP: sameOrigin check
386+
res.sameOrigin = false;
387+
var frameResource = this.resourcesDict[ frame.resourceID ];
388+
if (frameResource.protocol==res.protocol &&
389+
(frameResource.host==res.host )) //|| frameResource.host.substr(res.host)))
390+
{
391+
res.sameOrigin = true;
392+
}
393+
394+
384395
}
385396
else
386397
{

src/resource-manager/resource_templates.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ templates.resource_tree =
139139
'span',
140140
(r.filename||r.human_url),
141141
[],
142+
'style',(r.sameOrigin?'':'color:red'),
142143
'data-tooltip',(r&&'js-script-select'),
143144
'data-tooltip-text',(r&&groupName+': '+r.human_url)
144145
],

0 commit comments

Comments
 (0)