fix federation disabled middleware

This commit is contained in:
lesion 2021-11-08 10:59:47 +01:00
parent 7fdd0f0537
commit d435f55ae3
No known key found for this signature in database
GPG key ID: 352918250B012177
2 changed files with 2 additions and 3 deletions

View file

@ -23,8 +23,7 @@ router.use(cors())
router.use((req, res, next) => { router.use((req, res, next) => {
if (settingsController.settings.enable_federation) { return next() } if (settingsController.settings.enable_federation) { return next() }
log.debug('Federation disabled!') log.debug('Federation disabled!')
res.status(401).send('Federation disabled') return res.status(401).send('Federation disabled')
next(false)
}) })
router.use(express.json({ type: ['application/json', 'application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'] })) router.use(express.json({ type: ['application/json', 'application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'] }))