MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / isAuthorizedRequest

Function isAuthorizedRequest

website/api/lib/security.js:149–157  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

147}
148
149function isAuthorizedRequest(req) {
150 const expectedApiKey = process.env.BUNDLE_TRIGGER_API_KEY;
151 if (!expectedApiKey) {
152 return true;
153 }
154
155 const providedKey = req?.headers?.["x-bundle-trigger-key"];
156 return typeof providedKey === "string" && providedKey === expectedApiKey;
157}
158
159function __resetSecurityStateForTests() {
160 ipRateLimits.clear();

Callers 1

handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected