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

@ -55,7 +55,9 @@ rules = [
[oidc]
# Run Versia Server with this value missing to generate a new key
jwt_key = ""
# [oidc.keys]
# public = "XXXX"
# private = "XXXX"
# If enabled, Versia Server will require users to log in with an OAuth provider
forced = false

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)}`;