Fix /ap/actor not redirecting to home page in browsers

Fixes #1
This commit is contained in:
Shadowfacts 2019-10-10 12:31:49 -04:00
parent 3c16c0e5e6
commit f156586508
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 4 deletions

View File

@ -29,12 +29,12 @@ export default async function actor(router: Router) {
}; };
router.get("/ap/actor", (req, res) => { router.get("/ap/actor", (req, res) => {
if (req.accepts("application/activity+json")) { if (req.accepts("text/html")) {
res.redirect("/");
} else {
res.type("application/activity+json"); res.type("application/activity+json");
res.json(actorObj); res.json(actorObj);
res.end(); res.end();
} else {
res.redirect("/");
} }
}); });
} }