summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-12 15:32:58 +0200
committerGitHub <noreply@github.com>2021-09-12 15:32:58 +0200
commit7eea37d184e3905d2159aab622a94b7745fca537 (patch)
tree634b3fbc6e4b935fd2ef90b5e39b51ba8f914ea4
parentMerge pull request #347 from AlTech98/fixrelationships (diff)
parentIncreased CDN max upload to 10mb (diff)
downloadserver-7eea37d184e3905d2159aab622a94b7745fca537.tar.xz
Merge pull request #348 from AlTech98/fix-cdn-upload
Increased CDN max upload to 10mb, fix #318
-rw-r--r--cdn/src/Server.ts2
1 files changed, 2 insertions, 0 deletions
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/"));