Skip to content

Commit ec441ae

Browse files
Fixed: use "url" instead of the "initiator" for building the DNS resolution (#183)
Improves the detection of pages within private networks (which should always be immediately dropped).
1 parent 85785a1 commit ec441ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reporting/src/pages.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ export default class Pages {
12361236
// Safari quirks:
12371237
// * This API is not available
12381238
chrome_webRequest_onBeforeRedirect(details) {
1239-
if (details.initiator && details.initiator !== 'null' && details.ip) {
1240-
this._cacheDnsResolution(details.initiator, details.ip);
1239+
if (details.url && details.ip) {
1240+
this._cacheDnsResolution(details.url, details.ip);
12411241
}
12421242
if (details.type !== 'main_frame') {
12431243
return;
@@ -1292,8 +1292,8 @@ export default class Pages {
12921292
// Safari quirks:
12931293
// * This API is not available
12941294
chrome_webRequest_onResponseStarted(details) {
1295-
if (details.initiator && details.initiator !== 'null' && details.ip) {
1296-
this._cacheDnsResolution(details.initiator, details.ip);
1295+
if (details.url && details.ip) {
1296+
this._cacheDnsResolution(details.url, details.ip);
12971297
}
12981298
}
12991299

0 commit comments

Comments
 (0)