import rateLimit from "express-rate-limit";
import helmet from "helmet";
import cors from "cors";
import { env } from "../config/env.js";

export const commonSecurity = [
  helmet({
    contentSecurityPolicy: false
  }),
  cors({
    origin: env.corsOrigin,
    credentials: true,
  }),
  rateLimit({
    windowMs: 15 * 60 * 1000,
    max: 500,
    standardHeaders: true,
    legacyHeaders: false,
  }),
];
