Skip to content

Commit

Permalink
fix: don't apply bearer token middleware to root (#6939)
Browse files Browse the repository at this point in the history
Conflicts with scim which assumes Bearer <token>, and is located under
/scim, with no /api prefix
  • Loading branch information
chriswk committed Apr 25, 2024
1 parent 2400ffc commit cb40f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cb40f35

Please sign in to comment.