返回提交历史
Modified
src/app.ts
+2
-2
XFEstudio/SpaceNinjaServer
fix: handle content-encoding "e" (#1588)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1588 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
18a13911
代码差异
1 个文件
+2
-2
@@ -16,9 +16,9 @@ import { webuiRouter } from "@/src/routes/webui";
16
16
const app = express();
17
17
18
18
app.use((req, _res, next) => {
19
// 38.5.0 introduced "ezip" for encrypted body blobs.
19
// 38.5.0 introduced "ezip" for encrypted body blobs and "e" for request verification only (encrypted body blobs with no application data).
20
20
// The bootstrapper decrypts it for us but having an unsupported Content-Encoding here would still be an issue for Express, so removing it.
21
if (req.headers["content-encoding"] == "ezip") {
21
if (req.headers["content-encoding"] == "ezip" || req.headers["content-encoding"] == "e") {
22
22
req.headers["content-encoding"] = undefined;
23
23
}
24
24
next();