Merge pull request #4278 from mixelburg/fix/webhook-401-missing-signature

fix(webhook): return 401 when signature header is missing
This commit is contained in:
Mauricio Siu
2026-04-28 18:30:48 -06:00
committed by GitHub
+5
View File
@@ -28,6 +28,11 @@ export default async function handler(
res: NextApiResponse,
) {
const signature = req.headers["x-hub-signature-256"];
if (!signature) {
res.status(401).json({ message: "Missing signature header" });
return;
}
const githubBody = req.body;
if (!githubBody?.installation?.id) {