Update Nodecid

This commit is contained in:
Benjamin Toby 2023-11-01 08:34:54 +01:00
parent 7e18ed4d77
commit 0025e78a0e
2 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,5 @@
{
"preflight": ["git checkout .", "git pull", "npm install", "npm run build"],
"start": "npm start"
"start": "npm start",
"port": 5000
}

View File

@ -15,11 +15,9 @@ const key = process.env.GITHUB_WEBHOOK_SECRET || "";
* @returns {boolean}
*/
const verify_signature = (req: NextApiRequest) => {
console.log(req.headers);
const signature = createHmac("sha256", key)
.update(JSON.stringify(req.body))
.digest("hex");
console.log(signature);
return `sha256=${signature}` === req.headers["x-hub-signature-256"];
};