From ec810828779f8b1c35f690457f3dc13c622a342e Mon Sep 17 00:00:00 2001 From: Marcos Rodrigues Date: Thu, 13 Nov 2025 17:48:38 -0300 Subject: [PATCH 1/3] FIX: resolve cors from localhost --- src/main.ts | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/main.ts b/src/main.ts index 70161e2..f990f13 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,25 +18,35 @@ async function bootstrap() { }); const logger = new DadosferaLogger(); + const corsOrigins = []; + + if (process.env.ENV === 'local') { + corsOrigins.push('http://localhost:4200'); + } else { + corsOrigins.push( + 'https://app.stg.dadosfera.ai', + 'https://app.dadosfera.ai', + 'https://unimed.dadosfera.ai', + 'https://boston-scientific.dadosfera.ai', + 'https://plataforma.dadosfera.ai' + ); + } + const app = await NestFactory.create(AppModule, { logger, cors: { - origin: [ - 'https://app.stg.dadosfera.ai', - 'https://app.dadosfera.ai', - 'https://unimed.dadosfera.ai', - 'https://boston-scientific.dadosfera.ai', - 'https://plataforma.dadosfera.ai' - ], + origin: corsOrigins, methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', preflightContinue: false, optionsSuccessStatus: 204, credentials: true, }, }); + app.use(helmet()); app.use(cookieParser(process.env.COOKIE_SECRET)); - if (process.env.ENV === 'prd') { + + if (process.env.ENV !== 'local') { app.use('/catalog/register-dataset', json({ limit: '10mb' })); app.use( '/catalog/register-dataset', From dd0d08ad6e1128298a4d9b032fb2c8cc3f310a69 Mon Sep 17 00:00:00 2001 From: Marcos Rodrigues Date: Thu, 13 Nov 2025 17:48:55 -0300 Subject: [PATCH 2/3] FEAT: add permissions to lineage module --- src/authentication/permissions.enum.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/authentication/permissions.enum.ts b/src/authentication/permissions.enum.ts index 2426df7..3eeb2a7 100644 --- a/src/authentication/permissions.enum.ts +++ b/src/authentication/permissions.enum.ts @@ -390,6 +390,25 @@ export const PERMISSIONS_GROUPS = { }, }, }, + LINEAGE: { + title: { + 'pt-br': 'Explorar | Linhagem', + 'en-us': 'Explore | Lineage', + 'es-es': 'Explorar | Linaje', + }, + permissions: { + VIEW: { + seqid: 50, + claim: 'lineage:view', + usage: PermissionUsages.PUBLIC, + name: { + 'pt-br': 'Acessar ao módulo de Linhagem', + 'en-us': 'Access to Lineage module', + 'es-es': 'Acceda al módulo de Linaje', + }, + } + }, + }, EMBED: { title: { 'pt-br': 'Analisar | Incorporação', From d4451153a37a2d7a0f89e62c5e640c03194e6a97 Mon Sep 17 00:00:00 2001 From: Marcos Rodrigues Date: Thu, 13 Nov 2025 18:14:47 -0300 Subject: [PATCH 3/3] FIX: change wget to curl --- .github/workflows/k8s-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/k8s-deploy.yml b/.github/workflows/k8s-deploy.yml index d3d469d..c83898c 100644 --- a/.github/workflows/k8s-deploy.yml +++ b/.github/workflows/k8s-deploy.yml @@ -105,7 +105,7 @@ jobs: - name: Install Helmfile run: | - wget https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz + curl -fsSLO https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz tar -xzf helmfile_0.148.0_linux_amd64.tar.gz sudo mv helmfile /usr/local/bin/ helmfile --version