Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-23 10:52:00 +04:00
parent d5d77fee8a
commit b5a8781816

View File

@@ -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