diff --git a/shynet/analytics/tasks.py b/shynet/analytics/tasks.py index 5ea5bf4..6e6510c 100644 --- a/shynet/analytics/tasks.py +++ b/shynet/analytics/tasks.py @@ -61,7 +61,7 @@ def ingress_request( log.debug(f"Linked to service {service}") if dnt and service.respect_dnt: - log.debug("Ignoring because of DNT") + log.debug("Ignoring because of DNT or GPC") return try: diff --git a/shynet/analytics/views/ingress.py b/shynet/analytics/views/ingress.py index 538f1e6..b6b7609 100644 --- a/shynet/analytics/views/ingress.py +++ b/shynet/analytics/views/ingress.py @@ -29,6 +29,9 @@ def ingress(request, service_uuid, identifier, tracker, payload): location = request.META.get("HTTP_REFERER", "").strip() user_agent = request.META.get("HTTP_USER_AGENT", "").strip() dnt = request.META.get("HTTP_DNT", "0").strip() == "1" + gpc = request.META.get("HTTP_SEC_GPC", "0").strip() == "1" + if gpc or dnt: + dnt = True ingress_request.delay( service_uuid,