MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / getApiKey

Function getApiKey

apps/web/server/middlewares/integration.ts:16–24  ·  view source on GitHub ↗
(req: any)

Source from the content-addressed store, hash-verified

14}
15
16function getApiKey(req: any) {
17 const authorizationHeader =
18 req.headers instanceof Headers
19 ? req.headers.get('x-api-key')
20 : req.headers['x-api-key'];
21
22 if (!authorizationHeader) return null;
23 return decodeURIComponent(authorizationHeader);
24}
25
26export default function integrationMiddleware(_?: never) {
27 return async (req: AuthedRequestWithTenant, _: any, next: NextFunction) => {

Callers 1

integrationMiddlewareFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected