feat: global switch for disabling federation, + test

This commit is contained in:
Julian Lam
2023-05-24 14:00:41 -04:00
parent 1c8e13bb12
commit 099124c49e
6 changed files with 59 additions and 1 deletions

View File

@@ -302,7 +302,7 @@ middleware.proceedOnActivityPub = (req, res, next) => {
// For whatever reason, express accepts does not recognize "profile" as a valid differentiator
// Therefore, manual header parsing is used here.
const { accept } = req.headers;
if (!accept) {
if (!accept || !meta.config.activityPubEnabled) {
return next('route');
}