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

@ -24,7 +24,7 @@ module.exports = {
** Global CSS
*/
css: [
'vuetify/dist/vuetify.min.css',
'vuetify/dist/vuetify.min.css',
'@mdi/font/css/materialdesignicons.css',
'@/assets/style.less'
],

View file

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