Skip to content

Commit 0e5fc58

Browse files
authored
Merge pull request #4278 from mixelburg/fix/webhook-401-missing-signature
fix(webhook): return 401 when signature header is missing
2 parents cc7ea51 + ce703ef commit 0e5fc58

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/dokploy/pages/api/deploy/github.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export default async function handler(
2828
res: NextApiResponse,
2929
) {
3030
const signature = req.headers["x-hub-signature-256"];
31+
if (!signature) {
32+
res.status(401).json({ message: "Missing signature header" });
33+
return;
34+
}
35+
3136
const githubBody = req.body;
3237

3338
if (!githubBody?.installation?.id) {

0 commit comments

Comments
 (0)