MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / warnInvalidSignature

Function warnInvalidSignature

packages/cli/src/actions/proxy.ts:320–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318 const WARN_THROTTLE_SECS = 60;
319
320 function warnInvalidSignature() {
321 const now = Math.floor(Date.now() / 1000);
322 if (now - lastInvalidSigWarnAt >= WARN_THROTTLE_SECS) {
323 lastInvalidSigWarnAt = now;
324 console.warn(
325 colors.yellow(
326 'Warning: Received a request with an invalid signature. ' +
327 'Please double-check whether you have the correct public API key configured.',
328 ),
329 );
330 }
331 }
332
333 return (req: express.Request, res: express.Response, next: express.NextFunction) => {
334 const signatureHeader = req.headers['x-zenstack-signature'];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected