diff --git a/src/app.ts b/src/app.ts index 480b95a..acfc0e9 100644 --- a/src/app.ts +++ b/src/app.ts @@ -6,7 +6,7 @@ import { isTest } from "./utilities"; import AWS from "aws-sdk"; import databaseMiddleware from "./middleware/database-middleware"; -import customCors from "./middleware/cors-middleware"; +// import customCors from "./middleware/cors-middleware"; import morgan from "morgan"; import bodyParser from "body-parser"; import errorHandler from "./middleware/error-handler"; @@ -23,6 +23,8 @@ import subscriptionRouter from "./services/subscription/subscription-router"; import speakersRouter from "./services/speakers/speakers-router"; import puzzlebangRouter from "./services/puzzlebang/puzzlebang-router"; +import cors from "cors"; + AWS.config.update({ region: Config.S3_REGION, accessKeyId: Config.S3_ACCESS_KEY, @@ -37,7 +39,8 @@ app.disable("etag"); app.use(rateLimiter); -app.use(customCors); +// app.use(customCors); +app.use(cors()); // To display the logs every time app.use("/", morgan("dev"));