Fix proxy and split server into modules #1

Merged
probablycorey merged 18 commits from probablycorey/fix-proxy-404s into main 2026-03-11 16:35:00 +00:00
Showing only changes of commit 82febdbf7f - Show all commits

View File

@ -38,6 +38,11 @@ function proxyFetch(req: Request): Promise<Response> | Response {
headers,
body: hasBody ? req.body : undefined,
unix: SOCKET_PATH,
}).then((r) => {
const respHeaders = new Headers(r.headers)
respHeaders.delete('content-encoding')
respHeaders.delete('content-length')
return new Response(r.body, { status: r.status, headers: respHeaders })
}).catch((e) => {
console.error('Proxy error:', e)
return new Response('Tronbyt server is not responding', { status: 502 })