Skip to content

Commit

Permalink
verify logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rmnoon committed Jun 21, 2022
1 parent 6fb78f3 commit 95dc864
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ export default async function onCheck(req: VercelRequest, res: VercelResponse) {
const headers = toHeaders(req.headers);
const verify = getHeader('x-ackbot-verify', headers);
if (!verify) {
console.error('Missing verify: ', { req: cleanReq(req) });
res.status(403).send({ msg: 'Missing verify header.'});
return;
}
if (verify !== ACKBOT_VERIFY) {
console.error('Invalid verify: ', { verify, req: cleanReq(req) });
res.status(403).send({ msg: 'Invalid verify header.'});
return;
}
Expand Down

1 comment on commit 95dc864

@vercel
Copy link

@vercel vercel bot commented on 95dc864 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ackbot – ./

ackbot-rmnoon.vercel.app
ackbot-git-main-rmnoon.vercel.app
ackbot.vercel.app

Please sign in to comment.