Skip to content

Node.js based forum software built for the modern web

fix: skip signature verification for GET /actor

Julian Lam0e7fc1ab2336
diff --git a/src/middleware/activitypub.js b/src/middleware/activitypub.js
index ed6285912f..08948916f7 100644
--- a/src/middleware/activitypub.js
+++ b/src/middleware/activitypub.js
@@ -40,6 +40,11 @@ middleware.assertS2S = async function (req, res, next) {
};
middleware.verify = async function (req, res, next) {
+ // Skip verification for GET /actor
+ if (req.method === 'GET' && req.path === '/actor') {
+ return next();
+ }
+
// Verifies the HTTP Signature if present (required for POST)
if (req.headers.hasOwnProperty('signature')) {
const verified = await activitypub.verify(req);