Detect HTTP-header cookies via CookieStore change event
Progressive enhancement for Chromium browsers: listen on the CookieStore change event to catch cookies set by Set-Cookie HTTP response headers, which the document.cookie setter hook cannot see. Adds a new "http" cookie source through the full stack. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -266,6 +266,8 @@ func (h *Handler) handleReportDetectedCookies(w http.ResponseWriter, r *http.Req
|
||||
switch strings.TrimSpace(c.Source) {
|
||||
case "pre-existing":
|
||||
source = coredata.CookieSourcePreExisting
|
||||
case "http":
|
||||
source = coredata.CookieSourceHTTP
|
||||
default:
|
||||
source = coredata.CookieSourceScript
|
||||
}
|
||||
@@ -358,6 +360,8 @@ func (h *Handler) handleReportDetectedTrackers(w http.ResponseWriter, r *http.Re
|
||||
switch strings.TrimSpace(c.Source) {
|
||||
case "pre-existing":
|
||||
source = coredata.CookieSourcePreExisting
|
||||
case "http":
|
||||
source = coredata.CookieSourceHTTP
|
||||
default:
|
||||
source = coredata.CookieSourceScript
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user