(req: any)
| 14 | } |
| 15 | |
| 16 | function 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 | |
| 26 | export default function integrationMiddleware(_?: never) { |
| 27 | return async (req: AuthedRequestWithTenant, _: any, next: NextFunction) => { |
no test coverage detected