Skip to content

Commit

Permalink
Fix statistics reporting the 5.10 client as web (not just the import …
Browse files Browse the repository at this point in the history
…script)
  • Loading branch information
rubenwardy committed Nov 27, 2024
1 parent 7337619 commit 699eabe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/blueprints/packages/releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def download_release(package, id):

ip = request.headers.get("X-Forwarded-For") or request.remote_addr
if ip is not None and not is_user_bot():
is_minetest = (request.headers.get("User-Agent") or "").startswith("Minetest")
user_agent = request.headers.get("User-Agent") or ""
is_minetest = user_agent.startswith("Luanti") or user_agent.startswith("Minetest")
reason = request.args.get("reason")
PackageDailyStats.update(package, is_minetest, reason)

Expand Down

0 comments on commit 699eabe

Please sign in to comment.