fix(api): 🐛 Fix logging causing crashes when parsing FormData

This commit is contained in:
Jesse Wierzbinski 2024-09-14 17:30:02 +02:00
parent cf149b737a
commit a05a0b313f
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -6,7 +6,7 @@ import { config } from "~/packages/config-manager";
export const logger = createMiddleware(async (context, next) => {
if (config.logging.log_requests) {
const logger = getLogger("server");
const body = await context.req.text();
const body = await context.req.raw.clone().text();
const urlAndMethod = `${chalk.green(context.req.method)} ${chalk.blue(context.req.url)}`;