diff options
author | Raphael <mail@raphaelkabo.com> | 2025-05-28 19:20:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-28 19:20:48 +0100 |
commit | da7c011e1e2336f99e58af76971500b8940eb35d (patch) | |
tree | 0a8d344e331a0551b73435bbbb3919107737f69f /src | |
parent | 4664b6968fdcaca54268d60f400da02364213f05 (diff) | |
parent | 3d84891118f8a81af3ddb978af9b3f8b02fd5d65 (diff) |
Merge pull request #208 from filipesmedeiros/main
Add User Agent header to AP requests
Diffstat (limited to 'src')
-rw-r--r-- | src/activitypub.js | 4 | ||||
-rwxr-xr-x | src/routes.js | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/activitypub.js b/src/activitypub.js index d568231..dd7c7f7 100644 --- a/src/activitypub.js +++ b/src/activitypub.js @@ -222,6 +222,7 @@ export function signAndSend(message, eventID, targetDomain, inbox, callback) { Digest: `SHA-256=${digest}`, "Content-Type": activityPubContentType, Accept: activityPubContentType, + "User-Agent": `Gathio - ${domain}`, }, method: "POST", json: true, @@ -669,6 +670,7 @@ function _handleFollow(req, res) { headers: { Accept: activityPubContentType, "Content-Type": activityPubContentType, + "User-Agent": `Gathio - ${domain}`, }, }, function (error, response, body) { @@ -905,6 +907,7 @@ function _handleAcceptEvent(req, res) { headers: { Accept: activityPubContentType, "Content-Type": activityPubContentType, + "User-Agent": `Gathio - ${domain}`, }, }, function (error, response, body) { @@ -1126,6 +1129,7 @@ function _handleCreateNoteComment(req, res) { headers: { Accept: activityPubContentType, "Content-Type": activityPubContentType, + "User-Agent": `Gathio - ${domain}`, }, }, function (error, response, actor) { diff --git a/src/routes.js b/src/routes.js index eb7a6a1..6659670 100755 --- a/src/routes.js +++ b/src/routes.js @@ -1139,6 +1139,7 @@ router.post("/activitypub/inbox", (req, res) => { headers: { Accept: activityPubContentType, "Content-Type": activityPubContentType, + "User-Agent": `Gathio - ${domain}` }, }, function (error, response, actor) { |