Enhance security and validation across multiple routes:
All checks were successful
Build & Push Docker Image / build (push) Successful in 6m25s

- Escape XML and HTML special characters to prevent injection attacks.
- Implement rate limiting for various endpoints to mitigate abuse.
- Add validation for email formats, password lengths, and field limits.
- Ensure proper access control for recordings and room management.
This commit is contained in:
2026-02-28 19:49:29 +01:00
parent 616442a82a
commit 7466f3513d
10 changed files with 398 additions and 47 deletions

View File

@@ -25,7 +25,11 @@ const trustProxy = /^\d+$/.test(rawTrustProxy) ? parseInt(rawTrustProxy, 10) : r
app.set('trust proxy', trustProxy);
// Middleware
app.use(cors());
// M10: restrict CORS in production; allow all in development
const corsOptions = process.env.APP_URL
? { origin: process.env.APP_URL, credentials: true }
: {};
app.use(cors(corsOptions));
app.use(express.json());
// Initialize database & start server