diff --git a/backend/src/main.ts b/backend/src/main.ts index c59b3b64..caaf0026 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -3,7 +3,6 @@ import { NestExpressApplication } from "@nestjs/platform-express"; import { AppModule } from "./app.module"; import { join } from "path"; import { ValidationPipe, BadRequestException } from "@nestjs/common"; -import { SwaggerModule, DocumentBuilder } from "@nestjs/swagger"; import { CustomHttpExceptionFilter } from "./common/filters/http-exception.filter"; import { PrismaExceptionFilter } from "./common/filters/prisma-exception.filter"; import { DecimalInterceptor } from "./common/interceptors/decimal.interceptor"; @@ -144,24 +143,7 @@ async function bootstrap() { app.useGlobalInterceptors(new DecimalInterceptor()); - const isSwaggerEnabled = process.env.ENABLE_SWAGGER === "true"; - - if (isSwaggerEnabled) { - const config = new DocumentBuilder() - .setTitle("Canina Iran API") - .setDescription( - "API Documentation for Canina Iran Pet Health & Supplement Platform", - ) - .setVersion("1.0.0") - .addBearerAuth() - .build(); - - const document = SwaggerModule.createDocument(app, config); - SwaggerModule.setup("api/docs", app, document); - console.log("Swagger UI is ACTIVE on /api/docs"); - } else { - console.log("Swagger UI is DISABLED for security"); - } + // Swagger UI is permanently disabled across all environments for security await app.listen(process.env.PORT ?? 4001); }