mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(api): 🐛 Fix logging causing crashes when parsing FormData
This commit is contained in:
parent
cf149b737a
commit
a05a0b313f
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)}`;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue