fix(health): exclude /health endpoint from API prefix
The health check endpoint should be at /health not /api/v1/health for Docker health checks to work properly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
223aa25af1
commit
224e1fb509
|
|
@ -22,7 +22,7 @@ async function bootstrap() {
|
|||
});
|
||||
|
||||
// API prefix
|
||||
app.setGlobalPrefix('api/v1');
|
||||
app.setGlobalPrefix('api/v1', { exclude: ['health'] });
|
||||
|
||||
const configService = app.get(ConfigService);
|
||||
const port = configService.get<number>('PORT') || 3004;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ async function bootstrap() {
|
|||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
// 设置全局前缀
|
||||
app.setGlobalPrefix('api/v1');
|
||||
app.setGlobalPrefix('api/v1', { exclude: ['health'] });
|
||||
|
||||
// 启用CORS
|
||||
app.enableCors({
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ async function bootstrap() {
|
|||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
// 设置全局前缀
|
||||
app.setGlobalPrefix('api/v1');
|
||||
app.setGlobalPrefix('api/v1', { exclude: ['health'] });
|
||||
|
||||
// 启用CORS
|
||||
app.enableCors({
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ async function bootstrap() {
|
|||
credentials: true,
|
||||
});
|
||||
|
||||
app.setGlobalPrefix('api/v1');
|
||||
app.setGlobalPrefix('api/v1', { exclude: ['health'] });
|
||||
|
||||
const configService = app.get(ConfigService);
|
||||
const port = configService.get<number>('PAYMENT_SERVICE_PORT') || 3004;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ async function bootstrap() {
|
|||
credentials: true,
|
||||
});
|
||||
|
||||
app.setGlobalPrefix('api/v1');
|
||||
app.setGlobalPrefix('api/v1', { exclude: ['health'] });
|
||||
|
||||
const configService = app.get(ConfigService);
|
||||
const port = configService.get<number>('USER_SERVICE_PORT') || 3001;
|
||||
|
|
|
|||
Loading…
Reference in New Issue