返回提交历史
Modified
src/app.ts
+6
-0
XFEstudio/SpaceNinjaServer
fix: login failure on U18 (#1983)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1983 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
238af294
代码差异
1 个文件
+6
-0
@@ -21,6 +21,12 @@ app.use((req, _res, next) => {
21
21
if (req.headers["content-encoding"] == "ezip" || req.headers["content-encoding"] == "e") {
22
22
req.headers["content-encoding"] = undefined;
23
23
}
24
25
// U18 uses application/x-www-form-urlencoded even tho the data is JSON which Express doesn't like.
26
if (req.headers["content-type"] == "application/x-www-form-urlencoded") {
27
req.headers["content-type"] = "application/octet-stream";
28
}
29
24
30
next();
25
31
});
26
32