feat: strip accept-encoding header to ensure uncompressed responses in relay

This commit is contained in:
Abolfazl
2026-05-05 07:39:32 +03:30
parent 64363ed531
commit f42497aa82
5 changed files with 55 additions and 1 deletions
+3
View File
@@ -19,6 +19,9 @@ const STRIP_HEADERS = new Set([
"via",
// Internal relay hop header — must not propagate to the final target.
"x-mhr-hop",
// Workers cannot decompress gzip/br/deflate — stripping accept-encoding
// forces targets to reply with plain bodies the Worker can forward as-is.
"accept-encoding",
]);
function decodeBase64ToBytes(input) {