From e4e10b18d9e2353219152f9f6a93b1b08dbe21ac Mon Sep 17 00:00:00 2001 From: AlTech98 Date: Thu, 9 Sep 2021 16:55:02 +0200 Subject: [PATCH] Increased CDN max upload to 10mb --- cdn/src/Server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cdn/src/Server.ts b/cdn/src/Server.ts index f4a6b576..5c4a8ae5 100644 --- a/cdn/src/Server.ts +++ b/cdn/src/Server.ts @@ -2,6 +2,7 @@ import { Server, ServerOptions } from "lambert-server"; import { Config, initDatabase } from "@fosscord/util"; import path from "path"; import avatarsRoute from "./routes/avatars"; +import bodyParser from "body-parser"; export interface CDNServerOptions extends ServerOptions {} @@ -26,6 +27,7 @@ export class CDNServer extends Server { res.set("Access-Control-Allow-Methods", req.header("Access-Control-Request-Methods") || "*"); next(); }); + this.app.use(bodyParser.json({ inflate: true, limit: "10mb" })); await this.registerRoutes(path.join(__dirname, "routes/"));