fix webfinger
This commit is contained in:
parent
5c781eaaa2
commit
84aee9481f
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue