chore: update request handling for 38.5.0
All checks were successful
Build / build (18) (push) Successful in 42s
Build / build (20) (push) Successful in 1m4s
Build / build (22) (push) Successful in 56s
Build Docker image / docker (push) Successful in 30s

This commit is contained in:
Sainan 2025-03-19 20:38:14 +01:00
parent c98d872d52
commit 6eebf0aa84
3 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,15 @@ import { webuiRouter } from "@/src/routes/webui";
const app = express();
app.use((req, _res, next) => {
// 38.5.0 introduced "ezip" for encrypted body blobs.
// 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") {
req.headers["content-encoding"] = undefined;
}
next();
});
app.use(bodyParser.raw());
app.use(express.json({ limit: "4mb" }));
app.use(bodyParser.text());

View File

@ -1,5 +1,6 @@
import { Request, Response } from "express";
// POST with {} instead of GET as of 38.5.0
const getFriendsController = (_request: Request, response: Response): void => {
response.writeHead(200, {
//Connection: "keep-alive",

View File

@ -186,6 +186,7 @@ apiRouter.post("/focus.php", focusController);
apiRouter.post("/fusionTreasures.php", fusionTreasuresController);
apiRouter.post("/genericUpdate.php", genericUpdateController);
apiRouter.post("/getAlliance.php", getAllianceController);
apiRouter.post("/getFriends.php", getFriendsController);
apiRouter.post("/getGuildDojo.php", getGuildDojoController);
apiRouter.post("/getVoidProjectionRewards.php", getVoidProjectionRewardsController);
apiRouter.post("/gildWeapon.php", gildWeaponController);