MCPcopy Create free account
hub / github.com/async-labs/async / checkRequest

Function checkRequest

api/server/api/index.ts:30–41  ·  view source on GitHub ↗
(req, res, next)

Source from the content-addressed store, hash-verified

28}
29
30async function checkRequest(req, res, next) {
31 const signature = req.get('x-async-signature');
32
33 if (!verifySignature(signature)) {
34 res.status(201).json({
35 error: 'You do not have permission 2',
36 });
37 return;
38 }
39
40 next();
41}
42
43export default function api(server: express.Express) {
44 server.use('/api/v1/to-api-server/public', checkRequest, publicApi, handleError);

Callers

nothing calls this directly

Calls 1

verifySignatureFunction · 0.85

Tested by

no test coverage detected