diff options
author | AlTech98 <altech123159@gmail.com> | 2021-09-08 18:42:58 +0200 |
---|---|---|
committer | AlTech98 <altech123159@gmail.com> | 2021-09-08 18:42:58 +0200 |
commit | b3f91068e5311abcb7564c5dcec7cca48f04e5bc (patch) | |
tree | 8d6f7f3b9153970c0822f67f6b6eec9f722f3706 /cdn/src | |
parent | Merge pull request #343 from Stilic/patch-1 (diff) | |
download | server-b3f91068e5311abcb7564c5dcec7cca48f04e5bc.tar.xz |
Increased CDN max upload to 10mb
Diffstat (limited to 'cdn/src')
-rw-r--r-- | cdn/src/Server.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cdn/src/Server.ts b/cdn/src/Server.ts index f4a6b576..63499ce4 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,8 @@ 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" })); + this.app.use(bodyParser.urlencoded({ inflate: true, limit: "10mb" })); await this.registerRoutes(path.join(__dirname, "routes/")); |