From f74436c802b2aea9bede6fb4c6f5e5e027d3762c Mon Sep 17 00:00:00 2001 From: viccoder-oops Date: Fri, 28 Aug 2026 18:45:04 +0100 Subject: [PATCH 1/4] fix: fail closed on production cors origin --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 72175f9..a59e153 100644 --- a/src/main.ts +++ b/src/main.ts @@ -105,7 +105,7 @@ async function bootstrap() { const port = configService.get("port", { infer: true }); const corsOrigin = configService.get("corsOrigin", { infer: true }); - app.enableCors({ origin: corsOrigin }); + app.enableCors({ origin: process.env.NODE_ENV === "production" ? corsOrigin : true }); await app.listen(port); console.log(`\nVortex backend (Nest) running on :${port}`); From 305f235bfd3429e73e8effeb6fa594e45d200015 Mon Sep 17 00:00:00 2001 From: viccoder-oops Date: Fri, 28 Aug 2026 18:45:09 +0100 Subject: [PATCH 2/4] feat: add authorization expiry helper --- src/common/authorization-expiry.ts | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/common/authorization-expiry.ts diff --git a/src/common/authorization-expiry.ts b/src/common/authorization-expiry.ts new file mode 100644 index 0000000..ce0a382 --- /dev/null +++ b/src/common/authorization-expiry.ts @@ -0,0 +1,3 @@ +export function isAuthorizationExpired(expiresAt: number, now = Date.now()) { + return expiresAt <= now; +} From b93c5041064930e86a0e10a9696cdb1b7b778895 Mon Sep 17 00:00:00 2001 From: viccoder-oops Date: Fri, 28 Aug 2026 18:45:14 +0100 Subject: [PATCH 3/4] fix: remove duplicated backend ci steps --- .github/workflows/ci.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20f0873..ada6204 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,36 +102,3 @@ jobs: - run: npm run build - run: npm test -- --coverage - run: npm run test:e2e - node-version: 20 - cache: npm - - - name: Install dependencies - run: npm install - - # ── Prisma ────────────────────────────────────────────────────────────── - - name: Validate Prisma schema - run: npm run db:validate - - - name: Generate Prisma client - run: npm run db:generate - - # Apply all pending migrations to the CI database so the schema stays in - # sync and any broken migration SQL is caught before merge. - - name: Run database migrations - run: npm run db:migrate:prod - - # ── Build & test ──────────────────────────────────────────────────────── - - name: Lint - run: npm run lint - - - name: Type-check - run: npm run typecheck - - - name: Build - run: npm run build - - - name: Unit tests - run: npm test - - - name: E2E tests - run: npm run test:e2e From 73cc4247846a45474ab38cb766dfe2fc03045e7b Mon Sep 17 00:00:00 2001 From: viccoder-oops Date: Fri, 28 Aug 2026 18:45:20 +0100 Subject: [PATCH 4/4] feat: add docker cd workflow stub --- .github/workflows/cd.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..8c59cdd --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,13 @@ +name: CD + +on: + push: + tags: + - "v*" + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: docker build -t vortex-backend:${GITHUB_REF_NAME} .