mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-13 07:25:17 +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,
|
res: NextApiResponse,
|
||||||
) {
|
) {
|
||||||
const signature = req.headers["x-hub-signature-256"];
|
const signature = req.headers["x-hub-signature-256"];
|
||||||
|
if (!signature) {
|
||||||
|
res.status(401).json({ message: "Missing signature header" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const githubBody = req.body;
|
const githubBody = req.body;
|
||||||
|
|
||||||
if (!githubBody?.installation?.id) {
|
if (!githubBody?.installation?.id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user