(upstreamBaseUrl: string, route: string, rawUrl: string)
| 303 | } |
| 304 | |
| 305 | function buildUpstreamUrl(upstreamBaseUrl: string, route: string, rawUrl: string): URL { |
| 306 | const upstreamUrl = new URL(buildDaemonHttpUrl(upstreamBaseUrl, route)); |
| 307 | const rawSearchIndex = rawUrl.indexOf('?'); |
| 308 | if (rawSearchIndex >= 0) upstreamUrl.search = rawUrl.slice(rawSearchIndex); |
| 309 | return upstreamUrl; |
| 310 | } |
| 311 | |
| 312 | function buildUpstreamHeaders( |
| 313 | req: Pick<IncomingMessage, 'headers'>, |
no test coverage detected