Set user agent of crowdsec misp module to crowdsec-misp/v1.0.0

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
pull/602/head
Shivam Sandbhor 2023-02-20 10:11:38 +05:30
parent b7bd679b1c
commit 2c9b953f23
1 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,10 @@ def _handler_v2(request_data):
crowdsec_cti = requests.get(
f"https://cti.api.crowdsec.net/v2/smoke/{ip}",
headers={"x-api-key": request_data["config"]["api_key"]},
headers={
"x-api-key": request_data["config"]["api_key"],
"User-Agent": "crowdsec-misp/v1.0.0",
},
)
crowdsec_cti.raise_for_status()
crowdsec_cti = crowdsec_cti.json()