Merge pull request #602 from crowdsecurity/crowdsec_user_agent

Set user agent of crowdsec misp module to crowdsec-misp/v1.0.0
pull/606/head
Alexandre Dulaunoy 2023-02-20 06:44:18 +01:00 committed by GitHub
commit f09fe8d243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()