Skip to main content
Glama
request-id.js529 B
// src/middleware/request-id/request-id.ts var requestId = ({ limitLength = 255, headerName = "X-Request-Id", generator = () => crypto.randomUUID() } = {}) => { return async function requestId2(c, next) { let reqId = headerName ? c.req.header(headerName) : void 0; if (!reqId || reqId.length > limitLength || /[^\w\-=]/.test(reqId)) { reqId = generator(c); } c.set("requestId", reqId); if (headerName) { c.header(headerName, reqId); } await next(); }; }; export { requestId };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Valerio357/bet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server