XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

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
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +6 -0
Modified src/app.ts +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