fix/api-prox: PR Comments

This commit is contained in:
Kentai Radiquum 2025-07-08 15:51:54 +05:00
parent 155146c5a0
commit d23703b212
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
3 changed files with 24 additions and 21 deletions

View file

@ -14,6 +14,7 @@ import { MediaChromeTheme } from "./media-chrome";
import { Iframe } from "./iframe";
const app = express();
app.use(express.raw({ inflate: true, limit: "50mb", type: "multipart/form-data" }));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
@ -265,14 +266,10 @@ app.post("/*path", async (req, res) => {
: "application/json";
switch (reqContentType) {
case "multipart/form-data":
const formData = new FormData();
for (const name in req.body) {
formData.append(name, req.body[name]);
}
apiResponse = await fetch(url.toString(), {
method: "POST",
headers: apiHeaders,
body: formData,
body: req.body
});
break;
case "application/x-www-form-urlencoded":