Skip to content

Commit 3e8bd36

Browse files
committed
debug: handle non x-github-event POSTs
1 parent ce47913 commit 3e8bd36

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ server.post('/', async (request, response) => {
2323
try {
2424
const {headers, body} = request;
2525

26+
if (!headers['x-github-event']) {
27+
console.log('headers of non x-github-event POST', headers);
28+
return response.sendStatus(403);
29+
}
30+
2631
if (!body.repository) {
2732
console.log('body', body);
2833
console.log('headers', headers);

0 commit comments

Comments
 (0)