Commit e818483d authored by les's avatar les
Browse files

[fix] disable webfinger when federation is disabled

parent 8a9a9e77
......@@ -9,6 +9,13 @@ const url = require('url')
const debug = require('debug')('webfinger')
router.use(cors())
router.use((req, res, next) => {
// is federation enabled ?
if (req.settings.enable_federation) return next()
debug('Federation disabled')
res.status(404).send('Federation disabled')
})
router.get('/webfinger', async (req, res) => {
if (!req.query || !req.query.resource || !req.query.resource.includes('acct:')) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment