diff --git a/src/main.ts b/src/main.ts index b4f2e01..db6f7bf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -import { INestApplication } from '@nestjs/common'; +import { INestApplication, RequestMethod } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { NestFactory } from '@nestjs/core'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; @@ -17,6 +17,12 @@ async function bootstrap() { preflightContinue: false, optionsSuccessStatus: 204, }); + app.setGlobalPrefix('api', { + exclude: [ + { path: 'health', method: RequestMethod.GET }, + { path: 'health/details', method: RequestMethod.GET }, + ], + }); const config = app.get(ConfigService); const swaggerDocument = await createSwagger(app);