diff options
author | AlTech98 <altech123159@gmail.com> | 2021-09-09 16:55:02 +0200 |
---|---|---|
committer | AlTech98 <altech123159@gmail.com> | 2021-09-09 16:55:02 +0200 |
commit | d98ec90d2368b945e4905d740bb7c7a1ad4ba256 (patch) | |
tree | a37d1fa522d7582b5601223e0ff27c3347673ac9 | |
parent | Merge pull request #345 from fosscord/revert-344-master (diff) | |
download | server-d98ec90d2368b945e4905d740bb7c7a1ad4ba256.tar.xz |
Increased CDN max upload to 10mb
-rw-r--r-- | cdn/src/Server.ts | 2 |
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/")); |