OpenAPI: include content encoding into proxied response

This commit is contained in:
Fuma Nama
2025-09-06 16:51:59 +08:00
parent d193152789
commit 0146178f4f
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-openapi': patch
---
include content encoding into proxied response
+2 -1
View File
@@ -119,7 +119,8 @@ export function createProxy(options: CreateProxyOptions = {}): Proxy {
const headers = new Headers(res.headers);
headers.forEach((_value, originalKey) => {
const key = originalKey.toLowerCase();
if (key.startsWith('access-control-') || key === 'content-encoding') {
if (key.startsWith('access-control-')) {
headers.delete(originalKey);
}
});