Skip to content

Node.js based forum software built for the modern web

chore: remove debug logs

Julian Lamd8f481a71a13
diff --git a/src/activitypub/sendWorker.js b/src/activitypub/sendWorker.js
index 9b11f6e489..0589fb1af0 100644
--- a/src/activitypub/sendWorker.js
+++ b/src/activitypub/sendWorker.js
@@ -3,7 +3,6 @@
const { fetch, Agent } = require('undici');
const { check, lookup } = require('../ssrf');
const Signatures = require('./signatures');
-const winston = require('winston');
const nconf = require('nconf');
const { version } = require('../../package.json');
@@ -19,7 +18,6 @@ const MAX_BODY_SIZE = 10 * 1024 * 1024; // 10MB response limit
async function send({ id, uri, payload, digest, key, keyId }) {
const userAgent = `NodeBB/${version.split('.').shift()}.x (${nconf.get('url')})`;
- const DEBUG = process.env.AP_SEND_DEBUG === 'true';
try {
// Validate required fields
@@ -36,13 +34,6 @@ async function send({ id, uri, payload, digest, key, keyId }) {
// Sign
const headers = await Signatures.sign({ key, keyId }, uri, 'POST', digest);
- // Debug: log full request details
- if (DEBUG) {
- winston.verbose(`[activitypub/send] REQUEST uri=${uri}`);
- winston.verbose(`[activitypub/send] REQUEST headers=${JSON.stringify(headers)}`);
- winston.verbose(`[activitypub/send] REQUEST payload=${payload.substring(0, 500)}`);
- }
-
// POST — redirect: 'manual' prevents SSRF via HTTP redirect
// 10s timeout to prevent stuck tasks
const timeoutSignal = AbortSignal.timeout(10000);
@@ -75,12 +66,6 @@ async function send({ id, uri, payload, digest, key, keyId }) {
bodyText = await response.text();
} catch (e) { /* ignore */ }
- // Debug: log full response details
- if (DEBUG) {
- winston.verbose(`[activitypub/send] RESPONSE status=${response.status} headers=${JSON.stringify(Object.fromEntries(response.headers.entries()))}`);
- winston.verbose(`[activitypub/send] RESPONSE body=${bodyText.substring(0, 1000)}`);
- }
-
return { id, success: false, error: `HTTP ${response.status}: ${bodyText}` };
} catch (e) {
return { id, success: false, error: e.message || 'unknown error' };