1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00
budibase/packages/worker/src/middleware/handleScimBody.ts
2023-03-28 16:46:22 +01:00

12 lines
298 B
TypeScript

import { Ctx } from "@budibase/types"
export const handleScimBody = (ctx: Ctx, next: any) => {
var type = ctx.req.headers["content-type"] || ""
type = type.split(";")[0]
if (type === "application/scim+json") {
ctx.req.headers["content-type"] = "application/json"
}
return next()
}