-
-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
url doesn't take into consideration the setGlobalPrefix #228
Comments
Thank you for your issue. Sorry for taking so long. I am looking into it. I have to submit a PR first on nestjs/nest before continuing here. See nestjs/nest#2410. |
No problem @BrunnerLivio , thanks for getting back to me. |
Release Added You can specify the const app = await NestFactory.create(ApplicationModule);
app.setGlobalPrefix('/api');
...
TerminusModule.forRoot({
// Change the default option of all endpoints to use the global prefix
useGlobalPrefix: true,
endpoints: [
{
// Will result /liveness
url: '/liveness',
useGlobalPrefix: false,
healthIndicators: []
},
{
// Will result as /api/readiness
url: '/readiness',
healthIndicators: []
}
]
}) |
@BrunnerLivio how do you use this with |
Current behavior
Adding the url to the terminus doesn't take into consideration . the setGlobalPrefix..
For example, i have some metrics endpoints and that can be accessed via
this is because I have the following set
but terminus ignores this, and it is still available on /health and not /api/health
The reason I need this is that the root is being proxied, so I need to add any custom endpoints under /api
I have terminus configured like so
Expected behavior
For terminus to take into consideration the setGlobalPrefix
Environment
The text was updated successfully, but these errors were encountered: