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

@@ -45,6 +45,10 @@ const getClient = async () => {
};
async function OpenSearchUpdateHandler(req, res) {
if (req.headers["event-secret"] !== process.env.EVENT_SECRET) {
res.status(401).send("Unauthorized");
return;
}
try {
var osClient = await getClient();
// const osClient = new Client({