summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-03-02 17:28:29 +0100
committerdefault <nobody@localhost>2023-03-02 17:28:29 +0100
commitaaf6ff20c1d93dcb4b055deff333e0d9bd705830 (patch)
tree4d9382c6651cebd4902bbe6c05ef5ff5c1ab22b6
parentb2ce9323db88539860e0e71960ffdf22f33005e4 (diff)
Add the baseurl to the user agent in the signed GET.
-rw-r--r--http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/http.c b/http.c
index dba47a4..ae46001 100644
--- a/http.c
+++ b/http.c
@@ -87,11 +87,13 @@ xs_dict *http_signed_request_raw(const char *keyid, const char *seckey,
else
hdrs = xs_dict_append(hdrs, "accept", "application/activity+json");
+ xs *user_agent = xs_fmt("%s; +%s/", USER_AGENT, srv_baseurl);
+
hdrs = xs_dict_append(hdrs, "date", date);
hdrs = xs_dict_append(hdrs, "signature", signature);
hdrs = xs_dict_append(hdrs, "digest", digest);
hdrs = xs_dict_append(hdrs, "host", host);
- hdrs = xs_dict_append(hdrs, "user-agent", USER_AGENT);
+ hdrs = xs_dict_append(hdrs, "user-agent", user_agent);
response = xs_http_request(method, url, hdrs,
body, b_size, status, payload, p_size, timeout);