Snai3i-MarketPlace / backend / src / utils / cors.ts
cors.ts
Raw
import { CorsOptions } from "cors";
import { ORIGINS } from "../config/CheckableEnv";

export const ProductionCors: CorsOptions = {
  origin: ORIGINS,
  credentials: true,
};
export const DevCors: CorsOptions = {
  origin: (origin, callback) => {
    callback(null, origin);
  },
  credentials: true,
};