Add Do Not Track support

This commit is contained in:
R. Miles McCain
2020-04-22 13:18:25 -04:00
parent 3d10ddf711
commit c2f4724b11
7 changed files with 36 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ def ingress(request, service_uuid, identifier, tracker, payload):
client_ip, is_routable = get_client_ip(request)
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"
ingress_request.delay(
service_uuid,
@@ -27,7 +28,8 @@ def ingress(request, service_uuid, identifier, tracker, payload):
client_ip,
location,
user_agent,
identifier,
dnt=dnt,
identifier=identifier,
)