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 untrusted user: 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) => {
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("/");
}
});
}