From 570cde7c19400d320b026816b26ffe79725204d2 Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Thu, 9 Feb 2023 16:07:27 +0200 Subject: [PATCH] feat: increase request limit for routers --- packages/remote-server/src/agent-router.ts | 2 +- packages/remote-server/src/messaging-router.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/remote-server/src/agent-router.ts b/packages/remote-server/src/agent-router.ts index 5e95e4a27..c1204e4c0 100644 --- a/packages/remote-server/src/agent-router.ts +++ b/packages/remote-server/src/agent-router.ts @@ -29,7 +29,7 @@ export interface AgentRouterOptions { */ export const AgentRouter = (options: AgentRouterOptions): Router => { const router = Router() - router.use(json()) + router.use(json({ limit: '10mb' })) for (const exposedMethod of options.exposedMethods) { Debug('veramo:remote-server:initializing')(exposedMethod) diff --git a/packages/remote-server/src/messaging-router.ts b/packages/remote-server/src/messaging-router.ts index d10c64fa8..38621d2d3 100644 --- a/packages/remote-server/src/messaging-router.ts +++ b/packages/remote-server/src/messaging-router.ts @@ -35,7 +35,7 @@ export interface MessagingRouterOptions { */ export const MessagingRouter = (options: MessagingRouterOptions): Router => { const router = Router() - router.use(text({ type: '*/*' })) + router.use(text({ type: '*/*', limit: '10mb' })) router.post('/', async (req: RequestWithMessageHandler, res) => { try { const message = await req.agent?.handleMessage({