crowdsec_range_bouncer: User-Agent carries a version, the LAPI warned about a bad user agent on every pull

This commit is contained in:
2026-11-21 10:02:25 +00:00
parent b3aaf9062d
commit 3e859f94dc
@@ -28,7 +28,7 @@ def fetch_ranges(lapi_url, api_key):
"""Return the networks of all ban decisions with scope Range.""" """Return the networks of all ban decisions with scope Range."""
request = urllib.request.Request( request = urllib.request.Request(
lapi_url.rstrip("/") + "/v1/decisions?scopes=range", lapi_url.rstrip("/") + "/v1/decisions?scopes=range",
headers={"X-Api-Key": api_key, "User-Agent": "crowdsec-range-bouncer"}, headers={"X-Api-Key": api_key, "User-Agent": "crowdsec-range-bouncer/v1.0.0"},
) )
with urllib.request.urlopen(request, timeout=20) as response: with urllib.request.urlopen(request, timeout=20) as response:
decisions = json.load(response) decisions = json.load(response)