From d1d850ef2b6c3b54239a57239a1696c72a603e56 Mon Sep 17 00:00:00 2001 From: Martial Maillot Date: Mon, 23 Sep 2024 17:57:10 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20augmente=20la=20taille=20autoris=C3=A9e?= =?UTF-8?q?=20pour=20glossariser=20un=20contenu=20(#1476)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- targets/export-elasticsearch/src/server.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/targets/export-elasticsearch/src/server.ts b/targets/export-elasticsearch/src/server.ts index d038adb31..efd5c0292 100644 --- a/targets/export-elasticsearch/src/server.ts +++ b/targets/export-elasticsearch/src/server.ts @@ -4,6 +4,7 @@ import "./controllers"; import bodyParser from "body-parser"; import cors from "cors"; import type { NextFunction, Request, Response } from "express"; +import express from "express"; import { Container } from "inversify"; import { InversifyExpressServer } from "inversify-express-utils"; @@ -11,7 +12,7 @@ import { ExportEsRunMiddleware, GlossaryMiddleware, } from "./controllers/middlewares"; -import { S3Parameters, S3Repository, ExportRepository } from "./repositories"; +import { ExportRepository, S3Parameters, S3Repository } from "./repositories"; import { CopyContainerService, ExportService, @@ -87,6 +88,9 @@ rootContainer // create server const server = new InversifyExpressServer(rootContainer); server.setConfig((srv) => { + // Increase limit for glossary + srv.use(express.json({ limit: "5mb" })); + // add body parser srv.use( bodyParser.urlencoded({