diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index ea076ce..7b5a82f 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -133,7 +133,10 @@ export async function bootstrap() { console.log('[bootstrap] all stores initialized') app.use(cors({ origin: config.corsOrigins })) - app.use(bodyParser()) + // Raise JSON/text limits above the default 1mb: profile avatars are posted + // as base64 data URLs (up to ~1MB raw → ~1.37MB base64), which otherwise + // tripped a 413 in the body parser before reaching the handler. + app.use(bodyParser({ encoding: 'utf-8', jsonLimit: '4mb', textLimit: '4mb' })) console.log('[bootstrap] cors + bodyParser registered') // Register all routes (handles auth internally)