update package-lock.json 050224

This commit is contained in:
2026-05-18 14:37:02 +03:30
parent 5fc120becd
commit 97abb808b8
6 changed files with 3645 additions and 1435 deletions
+13
View File
@@ -4,8 +4,21 @@ import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { AppModule } from './app.module';
function configureCors(app: Awaited<ReturnType<typeof NestFactory.create>>) {
const raw = process.env.CORS_ORIGINS?.trim();
if (raw) {
const origins = raw.split(',').map((o) => o.trim()).filter(Boolean);
app.enableCors({ origin: origins, credentials: true });
return;
}
if (process.env.NODE_ENV !== 'production') {
app.enableCors({ origin: true, credentials: true });
}
}
async function bootstrap() {
const app = await NestFactory.create(AppModule);
configureCors(app);
app.useGlobalPipes(
new ValidationPipe({
forbidNonWhitelisted: true,