From f303662f6aafb7e7a5c824cbbf2059ce6e0dc9d3 Mon Sep 17 00:00:00 2001 From: LittleC Date: Mon, 7 Aug 2023 15:29:28 +0800 Subject: [PATCH] fix: add xml config --- packages/satori/src/router.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/satori/src/router.ts b/packages/satori/src/router.ts index 6a8ecac6..2ba2f21a 100644 --- a/packages/satori/src/router.ts +++ b/packages/satori/src/router.ts @@ -62,7 +62,9 @@ export class Router extends KoaRouter { // create server const koa = new Koa() - koa.use(require('koa-bodyparser')()) + koa.use(require('koa-bodyparser')({ + enableTypes: ['json', 'form', 'xml'], + })) koa.use(this.routes()) koa.use(this.allowedMethods())