From 0ff468be27818415836fab784f807e2a3894a54a Mon Sep 17 00:00:00 2001 From: Juriba Date: Sat, 31 Aug 2024 01:58:09 +0300 Subject: [PATCH] adding a load balancer with a domain rndplatform.juriba.info --- .github/workflows/cd.yml | 6 +++--- apps/server/src/main.ts | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 030e4d6..ad2c63f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -78,7 +78,7 @@ jobs: --max-instances 3 --min-instances 1 --concurrency 80 - --ingress internal + --allow-unauthenticated timeout: 600s - name: Deploy Client to Cloud Run @@ -97,6 +97,6 @@ jobs: --max-instances 3 --min-instances 1 --concurrency 100 - --ingress internal - timeout: 600s + --allow-unauthenticated + timeout: 600s diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index 4bdebdd..0a058d8 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -5,7 +5,7 @@ import { AppModule } from './app.module'; import mongoose from 'mongoose'; async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create(AppModule,{cors:true}); app.useGlobalPipes(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, @@ -21,11 +21,6 @@ async function bootstrap() { })); const globalPrefix = 'api/v1'; app.setGlobalPrefix(globalPrefix); - app.enableCors({ - origin: ['https://34.1.32.26', 'https://rndplatform.juriba.info'], - methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'], - credentials: true, - }); const port = process.env.PORT || 3000; await app.listen(port);