fix(proxy): strip stale encoding from upstream error responses

This commit is contained in:
Tam Nhu Tran committed 2026-05-13 09:13:28 -04:00
1 parent ab096ac37e
commit 1932b2ca61
2 files changed
+32

No files matched your search

@@ -50,6 +50,7 @@ export function createAnthropicErrorResponse(
): Response {
const responseHeaders = new Headers(headers);
responseHeaders.set('Content-Type', 'application/json');
responseHeaders.delete('Content-Encoding');
responseHeaders.delete('Content-Length');
return new Response(JSON.stringify(createAnthropicErrorPayload(type, message)), {