mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix: redirect to homepage when coming from fediverse, fix #478
This commit is contained in:
parent
5abb3cd1a1
commit
5f0728eb3e
1 changed files with 4 additions and 1 deletions
|
@ -10,8 +10,11 @@ const get = require('lodash/get')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
get (req, res) {
|
get (req, res) {
|
||||||
|
if (req.accepts(['html','json']) === 'html') {
|
||||||
|
log.debug('[FEDI] Get actor but prefer text/html, redirect to homepage')
|
||||||
|
return res.redirect(301, '/')
|
||||||
|
}
|
||||||
log.debug('[FEDI] Get actor')
|
log.debug('[FEDI] Get actor')
|
||||||
// if (req.accepts('html')) { return res.redirect(301, '/') }
|
|
||||||
const settings = settingsController.settings
|
const settings = settingsController.settings
|
||||||
const name = req.params.name
|
const name = req.params.name
|
||||||
if (!name) { return res.status(400).send('Bad request.') }
|
if (!name) { return res.status(400).send('Bad request.') }
|
||||||
|
|
Loading…
Reference in a new issue