(config)
| 700 | } |
| 701 | |
| 702 | function buildUpstreamHeaders(config) { |
| 703 | const headers = { |
| 704 | 'content-type': 'application/json', |
| 705 | } |
| 706 | |
| 707 | if (config.upstreamApiKey) { |
| 708 | headers.authorization = `Bearer ${config.upstreamApiKey}` |
| 709 | } |
| 710 | |
| 711 | return headers |
| 712 | } |
| 713 | |
| 714 | function joinUrl(base, maybePath) { |
| 715 | const normalizedBase = base.endsWith('/') ? base.slice(0, -1) : base |
no outgoing calls
no test coverage detected