fix federation disabled middleware
This commit is contained in:
parent
7fdd0f0537
commit
d435f55ae3
2 changed files with 2 additions and 3 deletions
|
@ -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"'] }))
|
||||||
|
|
Loading…
Reference in a new issue