"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CorsMiddleware = void 0;
const cors_1 = __importDefault(require("cors"));
const corsOptions = {
    origin: true,
    credentials: true,
};
const CorsMiddleware = (req, res, next, app) => {
    (0, cors_1.default)(corsOptions)(req, res, next);
    app.options("*", (0, cors_1.default)());
};
exports.CorsMiddleware = CorsMiddleware;
