fix webfinger

This commit is contained in:
Moon Man 2023-12-27 10:32:45 -05:00
parent 5c781eaaa2
commit 84aee9481f
2 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ app.get("/:slug.html", async (req, res) => {
}
else {
const filename = article.file.replace(/\.md$/, ".html");
res.sendFile(filename);
res.sendFile(process.env.base_dir + "/" + filename);
}
});
@ -115,7 +115,7 @@ app.get("/:slug.md", async (req, res) => {
res.status(404).send("not found");
}
else {
res.sendFile(article.file);
res.sendFile(process.env.base_dir + "/" + article.file);
}
});

View File

@ -101,7 +101,7 @@ export const getPublicKey = async (actorUrl: string, signedInit: SignedInit): Pr
else return null;
};
const domainStripper = new RegExp("/@" + process.env.blog_url?.replace(".", "\\.") + "$/i");
const domainStripper = new RegExp("@" + process.env.blog_host?.replaceAll(".", "\\.") + "$", "i");
export const handleWebfingerGet = async (req: Request, res: Response) => {
let nickname = req.query.resource;