From 8d71a26ad5a5c6559d2c3393e821ca7ecbecbd55 Mon Sep 17 00:00:00 2001 From: George Mulhearn Date: Wed, 6 Mar 2024 07:49:51 +1000 Subject: [PATCH] patch for user agent doc loader Signed-off-by: George Mulhearn --- aries_cloudagent/vc/ld_proofs/document_downloader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aries_cloudagent/vc/ld_proofs/document_downloader.py b/aries_cloudagent/vc/ld_proofs/document_downloader.py index a465522eff..aac93839e9 100644 --- a/aries_cloudagent/vc/ld_proofs/document_downloader.py +++ b/aries_cloudagent/vc/ld_proofs/document_downloader.py @@ -9,6 +9,7 @@ from typing import Dict, Optional import urllib.parse as urllib_parse from importlib import resources +from ...version import __version__ import requests from pyld import jsonld @@ -122,6 +123,7 @@ def download(self, url: str, options: Optional[Dict], **kwargs): headers = options.get("headers") if headers is None: headers = {"Accept": "application/ld+json, application/json"} + headers["User-Agent"] = f"AriesCloudAgent/{__version__}" response = requests.get(url, headers=headers, **kwargs) content_type = response.headers.get("content-type")