Sindbad~EG File Manager

Current Path : /home/infinitibizsol/autocrm.infinitibizsol.com/config/
Upload File :
Current File : /home/infinitibizsol/autocrm.infinitibizsol.com/config/cors-options.js

const whiteList = [
  "https://autocrm.infinitibizsol.com",
  "http://localhost:3000",
  "http://localhost:3001",
  "https://auction-sync.com/",
  "http://auction-sync.com/",
  "https://auction-flow.com/",
  "http://auction-flow.com/",
  "https://auction-flow.com.infinitibizsol.com",
  "https://auction-sync.com.infinitibizsol.com",
  "https://testing.infinitibizsol.com",
  "http://autocrm.infinitibizsol.com/"
];
const corsOptions = {
  origin: (origin, callback) => {
    if (whiteList.indexOf(origin) !== -1 || !origin) {
      callback(null, true);
    } else {
      callback(new Error("Not allowed by cors"));
    }
  },
  methods: ['GET', 'POST', 'PUT', 'DELETE'], // Add other HTTP methods as needed
    allowedHeaders: ['Content-Type', 'Authorization'], // Include other headers here as needed
    credentials: true,
};

module.exports = corsOptions;

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists