mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
fix: bearer tokens with base-path (#7065)
## About the changes
We've identified that Bearer token middleware is not working for
/enterprise instance.
Looking at a few lines below:
88e3b1b79e/src/lib/app.ts (L81-L84)
we can see that we were missing the basePath in the use definition.
This commit is contained in:
parent
88e3b1b79e
commit
7cf9cfa96e
@ -61,7 +61,7 @@ export default async function getApp(
|
||||
|
||||
app.use(requestLogger(config));
|
||||
|
||||
app.use('/api', bearerTokenMiddleware(config)); // We only need bearer token compatibility on /api paths.
|
||||
app.use(`${baseUriPath}/api`, bearerTokenMiddleware(config)); // We only need bearer token compatibility on /api paths.
|
||||
|
||||
if (typeof config.preHook === 'function') {
|
||||
config.preHook(app, config, services, db);
|
||||
|
Loading…
Reference in New Issue
Block a user