mirror of
https://github.com/dokploy/dokploy.git
synced 2026-06-13 19:09:49 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user