Merge pull request #348 from AlTech98/fix-cdn-upload

Increased CDN max upload to 10mb, fix #318
This commit is contained in:
Flam3rboy 2021-09-12 15:32:58 +02:00 committed by GitHub
commit 7eea37d184

View File

@ -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/"));