(options: DaemonProxyOptions)
| 35 | const FORWARDED_RESPONSE_HEADERS = ['content-type', 'content-disposition', 'x-request-id']; |
| 36 | |
| 37 | export function createDaemonProxyServer(options: DaemonProxyOptions): http.Server { |
| 38 | const normalized = normalizeProxyOptions(options); |
| 39 | return http.createServer((req, res) => { |
| 40 | void handleProxyRequest(req, res, normalized).catch((error: unknown) => { |
| 41 | sendProxyError(res, error); |
| 42 | }); |
| 43 | }); |
| 44 | } |
| 45 | |
| 46 | async function handleProxyRequest( |
| 47 | req: IncomingMessage, |
no test coverage detected