Update Nodecid
This commit is contained in:
parent
7e18ed4d77
commit
0025e78a0e
@ -1,4 +1,5 @@
|
||||
{
|
||||
"preflight": ["git checkout .", "git pull", "npm install", "npm run build"],
|
||||
"start": "npm start"
|
||||
"start": "npm start",
|
||||
"port": 5000
|
||||
}
|
||||
|
@ -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"];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user