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"],
|
"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}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
const verify_signature = (req: NextApiRequest) => {
|
const verify_signature = (req: NextApiRequest) => {
|
||||||
console.log(req.headers);
|
|
||||||
const signature = createHmac("sha256", key)
|
const signature = createHmac("sha256", key)
|
||||||
.update(JSON.stringify(req.body))
|
.update(JSON.stringify(req.body))
|
||||||
.digest("hex");
|
.digest("hex");
|
||||||
console.log(signature);
|
|
||||||
return `sha256=${signature}` === req.headers["x-hub-signature-256"];
|
return `sha256=${signature}` === req.headers["x-hub-signature-256"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user