MCPcopy Index your code
hub / github.com/anomalyco/opencode / proxyResponseHeaders

Function proxyResponseHeaders

packages/opencode/src/server/shared/ui.ts:30–38  ·  view source on GitHub ↗
(headers: Record<string, string>)

Source from the content-addressed store, hash-verified

28}
29
30function proxyResponseHeaders(headers: Record<string, string>) {
31 const result = new Headers(headers)
32 // FetchHttpClient exposes decoded response bodies, so forwarding upstream
33 // transfer metadata makes browsers decode already-decoded assets again.
34 result.delete("content-encoding")
35 result.delete("content-length")
36 result.delete("transfer-encoding")
37 return result
38}
39
40export function upstreamURL(path: string) {
41 return new URL(path, UI_UPSTREAM).toString()

Callers 1

serveUIEffectFunction · 0.85

Calls 1

deleteMethod · 0.45

Tested by

no test coverage detected