Node.js based forum software built for the modern web
fix(activitypub): add User-Agent header to fetch requests\n\n- Match NodeBB/request.js format: NodeBB/x.x.x (site-url)\n- Prevents remote servers from rejecting requests as bots\n\nAssisted-by: unsloth/Qwen3.6-35B-A3B-GGUF
Julian Lam634cb7d464cb
diff --git a/src/activitypub/sendWorker.js b/src/activitypub/sendWorker.jsindex 65e920c4b3..5af159f558 100644--- a/src/activitypub/sendWorker.js+++ b/src/activitypub/sendWorker.js@@ -12,8 +12,11 @@const { fetch, Agent } = require('undici');const { check, lookup } = require('../ssrf');const winston = require('winston');+const nconf = require('nconf');+const { version } = require('../../package.json');const DEBUG = process.env.AP_SEND_DEBUG === 'true';+const userAgent = `NodeBB/${version.split('.').shift()}.x (${nconf.get('url')})`;const {importPrivateKey,@@ -170,6 +173,7 @@ process.on('message', async (message) => {headers: {...headers,'content-type': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',+ 'user-agent': userAgent,},body: payload,signal: combinedSignal,