Report full URL instead of bare origin for detected scripts and iframes
Strip query params and send origin+pathname so the backend can distinguish resources served from the same domain but different paths (e.g. gtm.js vs recaptcha/api.js on googletagmanager.com). Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.probo.inc/probo/pkg/page"
|
||||
"go.probo.inc/probo/pkg/uri"
|
||||
"go.probo.inc/probo/pkg/validator"
|
||||
)
|
||||
|
||||
@@ -125,7 +126,7 @@ type (
|
||||
}
|
||||
|
||||
DetectedResourceItem struct {
|
||||
Origin string
|
||||
URL uri.URI
|
||||
ResourceType coredata.TrackerType
|
||||
}
|
||||
|
||||
@@ -1992,7 +1993,7 @@ func (s *Service) ReportDetectedTrackers(
|
||||
now,
|
||||
detectedTrackerInfo{
|
||||
TrackerType: dr.ResourceType,
|
||||
Identifier: dr.Origin,
|
||||
Identifier: dr.URL.String(),
|
||||
},
|
||||
&inserted,
|
||||
); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user