Additional security hardening.

This commit is contained in:
Patrick Fic
2023-05-04 11:59:39 -07:00
parent 99b847822f
commit b861957342
9 changed files with 89 additions and 35 deletions

View File

@@ -1,3 +1,12 @@
exports.servertime = (req, res) => {
res.status(200).send(new Date());
};
exports.jsrAuth = async (req, res) => {
res.send(
"Basic " +
Buffer.from(
`${process.env.JSR_USER}:${process.env.JSR_PASSWORD}`
).toString("base64")
);
};