From 4acdbedabd42e021d99fc4a95b0afd0cacbf5528 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Mon, 7 Jul 2025 18:08:14 -0700 Subject: [PATCH] Content parser support for scim+json --- apps/server/src/main.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index 8a271930..bfb47cf5 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -39,6 +39,22 @@ async function bootstrap() { await app.register(fastifyMultipart); await app.register(fastifyCookie); + app + .getHttpAdapter() + .getInstance() + .addContentTypeParser( + 'application/scim+json', + { parseAs: 'string' }, + (_, body, done) => { + try { + const json = JSON.parse(body.toString()); + done(null, json); + } catch (err: any) { + done(err); + } + }, + ); + app .getHttpAdapter() .getInstance()