Content parser support for scim+json

This commit is contained in:
Philipinho
2025-07-07 18:08:14 -07:00
parent 61395d1334
commit 4acdbedabd

View File

@ -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()