From a51bbda2b52853d7e91b0b338679812466c322c8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 27 May 2022 09:59:16 +0100 Subject: [PATCH] Set user agent for webfinger --- posts.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index cd53e5fd4..b54673732 100644 --- a/posts.py +++ b/posts.py @@ -2802,10 +2802,17 @@ def send_signed_json(post_json_object: {}, session, base_dir: str, if debug: print('DEBUG: handle - ' + handle + ' to_port ' + str(to_port)) + # domain shown in the user agent + ua_domain = curr_domain + if to_domain.endswith('.onion'): + ua_domain = onion_domain + elif to_domain.endswith('.i2p'): + ua_domain = i2p_domain + # lookup the inbox for the To handle wf_request = webfinger_handle(session, handle, http_prefix, cached_webfingers, - domain, project_version, debug, + ua_domain, project_version, debug, group_account, signing_priv_key_pem) if not wf_request: if debug: