diff --git a/src/middleware/cors-middleware.ts b/src/middleware/cors-middleware.ts index be5e39f..599548f 100644 --- a/src/middleware/cors-middleware.ts +++ b/src/middleware/cors-middleware.ts @@ -1,4 +1,4 @@ -import cors from "cors"; +// import cors from "cors"; // // Allow CORS for Netlify deploy previews // const allowedOrigins = ["https://reflectionsprojections.org"]; @@ -22,4 +22,4 @@ import cors from "cors"; // }, // }); -export default cors(); +// export default cors(); diff --git a/src/services/subscription/subscription-router.ts b/src/services/subscription/subscription-router.ts index 50555bf..93523ef 100644 --- a/src/services/subscription/subscription-router.ts +++ b/src/services/subscription/subscription-router.ts @@ -2,12 +2,13 @@ import { Router } from "express"; import { StatusCodes } from "http-status-codes"; import { SubscriptionValidator } from "./subscription-schema"; import { Database } from "../../database"; -import corsMiddleware from "../../middleware/cors-middleware"; +// import corsMiddleware from "../../middleware/cors-middleware"; +import cors from "cors"; const subscriptionRouter = Router(); // Create a new subscription -subscriptionRouter.post("/", corsMiddleware, async (req, res, next) => { +subscriptionRouter.post("/", cors(), async (req, res, next) => { try { // Validate the incoming user subscription const subscriptionData = SubscriptionValidator.parse(req.body);