From d52c2269fbe5c3dca56a860751c8f57584cd0a81 Mon Sep 17 00:00:00 2001 From: Aditya Pulipaka Date: Sat, 21 Mar 2026 21:03:18 +0000 Subject: [PATCH] CI/CD and more sensible authentication limiting --- .github/workflows/deploy.yml | 19 +++++++++++++++++++ server/src/auth/rateLimiter.ts | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cc43caf --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,19 @@ +name: Deploy +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: self-hosted + steps: + - name: Pull latest + run: git -C /home/adipu/LabWise pull + + - name: Install dependencies + run: | + cd /home/adipu/LabWise + PATH="/home/adipu/.local/node20/bin:$PATH" npm install --prefix server + + - name: Restart app + run: systemctl --user restart labwise-app diff --git a/server/src/auth/rateLimiter.ts b/server/src/auth/rateLimiter.ts index e5b77aa..8ada730 100644 --- a/server/src/auth/rateLimiter.ts +++ b/server/src/auth/rateLimiter.ts @@ -1,7 +1,7 @@ import rateLimit from 'express-rate-limit'; export const authRateLimiter = rateLimit({ - windowMs: 15 * 60 * 1000, // 15 minutes + windowMs: 60 * 1000, // 1 minute max: 20, standardHeaders: true, legacyHeaders: false,