fix: handle content-encoding "e"
All checks were successful
Build / build (pull_request) Successful in 1m27s
Build / build (push) Successful in 1m32s

This commit is contained in:
Sainan 2025-04-12 15:27:05 +02:00
parent 5c6b4b5779
commit 897a486cc6

View File

@ -16,9 +16,9 @@ import { webuiRouter } from "@/src/routes/webui";
const app = express();
app.use((req, _res, next) => {
// 38.5.0 introduced "ezip" for encrypted body blobs.
// 38.5.0 introduced "ezip" for encrypted body blobs and "e" for request verification only (encrypted body blobs with no application data).
// The bootstrapper decrypts it for us but having an unsupported Content-Encoding here would still be an issue for Express, so removing it.
if (req.headers["content-encoding"] == "ezip") {
if (req.headers["content-encoding"] == "ezip" || req.headers["content-encoding"] == "e") {
req.headers["content-encoding"] = undefined;
}
next();