added connecting ip to metrics for abuse detection

This commit is contained in:
alyssadev 2023-09-18 15:43:06 +10:00
parent e610ffa81f
commit 33c6813b87

View file

@ -32,7 +32,8 @@ function create_response(request, body, metadata) {
request.cf.country, request.cf.country,
request.cf.asn, request.cf.asn,
request.cf.timezone, request.cf.timezone,
new Date().toISOString() new Date().toISOString(),
request.headers.get("cf-connecting-ip")
] ]
}) })
return new Response(body, metadata) return new Response(body, metadata)