From af2baa445afe6a11a203a7efe30269a880441ba0 Mon Sep 17 00:00:00 2001 From: _LittleC_ Date: Mon, 7 Aug 2023 17:40:30 +0800 Subject: [PATCH] fix(core): support xml body (#143) --- 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())