diff --git a/lib/activitypub/actor.ts b/lib/activitypub/actor.ts index cc9266f..8f69787 100644 --- a/lib/activitypub/actor.ts +++ b/lib/activitypub/actor.ts @@ -29,12 +29,12 @@ export default async function actor(router: Router) { }; 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.json(actorObj); res.end(); - } else { - res.redirect("/"); } }); -} \ No newline at end of file +}