Merge pull request #299 from MuziIsabel/fix/strip-content-encoding-in-proxy-go

fix: strip content-encoding header in proxyToGo to prevent Brotli decode error
This commit is contained in:
CJACK.
2026-04-25 20:31:28 +08:00
committed by GitHub

View File

@@ -53,7 +53,8 @@ async function proxyToGo(req, res, rawBody) {
res.statusCode = upstream.status;
upstream.headers.forEach((value, key) => {
if (key.toLowerCase() === 'content-length') {
const lower = key.toLowerCase();
if (lower === 'content-length' || lower === 'content-encoding') {
return;
}
res.setHeader(key, value);