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
+4
View File
@@ -26,6 +26,10 @@ const SKIP_HEADERS = {
"x-forwarded-port": 1, "x-real-ip": 1, "forwarded": 1, "via": 1,
// Internal relay hop-count header — must not be forwarded to target sites.
"x-mhr-hop": 1,
// UrlFetchApp does not decompress gzip/br/deflate responses — stripping
// accept-encoding forces targets to reply with plain (uncompressed) bodies
// so the relay never has to handle compressed content it cannot decode.
"accept-encoding": 1,
};
// Pattern that matches any Google Apps Script execution endpoint.