Skip to content

Commit

Permalink
1157: Update url filter logic and expose new urls to snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-at-flexion committed Sep 19, 2024
1 parent 830fbdd commit eae1153
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions entities/core-result.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ export class CoreResult {
thirdPartyServiceDomains?: string;

@Column({ nullable: true })
//@Expose({ name: 'third_party_service_urls' })
@Exclude()
@Expose({ name: 'third_party_service_urls' })
@Transform((value: string) => {
if (value) {
return value.split(',');
Expand Down Expand Up @@ -526,6 +525,7 @@ export class CoreResult {
'dap_version',
'ga_tag_id',
'third_party_service_domains',
'third_party_service_urls',
'third_party_service_count',
'cookie_domains',
'viewport_meta_tag',
Expand Down
4 changes: 2 additions & 2 deletions libs/core-scanner/src/scans/third-party.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export function thirdPartyServicesUrls ( parentLogger: Logger, outboundRequests:
const url = request && new URL(request.url());
if (parsedUrl.hostname != url.hostname && !request.isNavigationRequest()) {
const fullUrl = removeQueryParameters(url.toString());
const isFileLoad = fullUrl.startsWith('data:') || fullUrl.startsWith('blob:');
if( !isFileLoad) {
const isFileLoad = fullUrl.startsWith('http') || fullUrl.startsWith('https');
if( isFileLoad) {
thirdPartyDomains.push(fullUrl);
}
}
Expand Down

0 comments on commit eae1153

Please sign in to comment.