fix federation disabled middleware
This commit is contained in:
@@ -24,7 +24,7 @@ module.exports = {
|
|||||||
** Global CSS
|
** Global CSS
|
||||||
*/
|
*/
|
||||||
css: [
|
css: [
|
||||||
'vuetify/dist/vuetify.min.css',
|
'vuetify/dist/vuetify.min.css',
|
||||||
'@mdi/font/css/materialdesignicons.css',
|
'@mdi/font/css/materialdesignicons.css',
|
||||||
'@/assets/style.less'
|
'@/assets/style.less'
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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"'] }))
|
||||||
|
|||||||
Reference in New Issue
Block a user