diff options
author | conner <59223342+Intevel@users.noreply.github.com> | 2021-09-09 16:40:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-09 16:40:05 +0200 |
commit | ea7f7c18ad8a7a891ecec3c8a60a191b78b0e742 (patch) | |
tree | 5de00f1ba64eaf1125a01f83743af8dc8d2267b6 | |
parent | Merge pull request #343 from Stilic/patch-1 (diff) | |
parent | Removed urlencoded bodyparser (diff) | |
download | server-ea7f7c18ad8a7a891ecec3c8a60a191b78b0e742.tar.xz |
Merge pull request #344 from AlTech98/master
Increased CDN max upload to 10mb, fix #318
-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/")); |