Skip to content

Commit

Permalink
patch for user agent doc loader
Browse files Browse the repository at this point in the history
Signed-off-by: George Mulhearn <[email protected]>
  • Loading branch information
gmulhearn-anonyome committed Mar 5, 2024
1 parent ef204a5 commit 8d71a26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aries_cloudagent/vc/ld_proofs/document_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 8d71a26

Please sign in to comment.