@@ -222,10 +222,14 @@ func (h *Handler) handleReportDetectedCookies(w http.ResponseWriter, r *http.Req
|
|||||||
if name == "" {
|
if name == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
detected = append(detected, cookiebanner.DetectedCookie{
|
|
||||||
Name: name,
|
detected = append(
|
||||||
Duration: strings.TrimSpace(c.Duration),
|
detected,
|
||||||
})
|
cookiebanner.DetectedCookie{
|
||||||
|
Name: name,
|
||||||
|
Duration: strings.TrimSpace(c.Duration),
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(detected) == 0 {
|
if len(detected) == 0 {
|
||||||
@@ -242,6 +246,7 @@ func (h *Handler) handleReportDetectedCookies(w http.ResponseWriter, r *http.Req
|
|||||||
jsonutil.RenderNotFound(w, fmt.Errorf("banner not found"))
|
jsonutil.RenderNotFound(w, fmt.Errorf("banner not found"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
h.logger.ErrorCtx(r.Context(), "cannot report detected cookies", log.Error(err))
|
h.logger.ErrorCtx(r.Context(), "cannot report detected cookies", log.Error(err))
|
||||||
jsonutil.RenderInternalServerError(w)
|
jsonutil.RenderInternalServerError(w)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user