We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5620e29 commit 4367f6cCopy full SHA for 4367f6c
1 file changed
app/analytics.py
@@ -50,7 +50,10 @@ def post(event_id):
50
return
51
52
actor_id = os.environ["GITHUB_ACTOR_ID"]
53
- referrer = os.environ["GITHUB_SERVER_URL"]
+ referrer = (
54
+ os.environ["GITHUB_SERVER_URL"] + "/" + os.environ["GITHUB_REPOSITORY_OWNER"]
55
+ )
56
+ ip_address = requests.get("https://ifconfig.me", timeout=5).text
57
58
response = requests.post(
59
"https://plausible.io/api/event",
@@ -65,6 +68,7 @@ def post(event_id):
65
68
},
66
69
headers={
67
70
"User-Agent": f"kiwitcms-gitops/{__version__}.{actor_id}",
71
+ "X-Forwarded-For": ip_address,
72
"Content-Type": "application/json",
73
74
timeout=10,
0 commit comments