From cb40f35aeb7d33aabb0c1c967aaa0d0def024429 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Thu, 25 Apr 2024 16:56:51 +0200 Subject: [PATCH] fix: don't apply bearer token middleware to root (#6939) Conflicts with scim which assumes Bearer , and is located under /scim, with no /api prefix --- src/lib/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/app.ts b/src/lib/app.ts index d9fe211fb8..fad34a65f2 100644 --- a/src/lib/app.ts +++ b/src/lib/app.ts @@ -61,7 +61,7 @@ export default async function getApp( app.use(requestLogger(config)); - app.use(bearerTokenMiddleware(config)); + app.use('/api', bearerTokenMiddleware(config)); // We only need bearer token compatibility on /api paths. if (typeof config.preHook === 'function') { config.preHook(app, config, services, db);