diff --git a/account/src/index.ts b/account/src/index.ts index c7881e7..c05e3c3 100644 --- a/account/src/index.ts +++ b/account/src/index.ts @@ -14,7 +14,11 @@ app.set("view engine", "ejs"); app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(express.static("public")); -app.use(cors({ origin: inProd ? /\.lingdocs\.com$/ : "*", credentials: true })); +app.use(cors({ + origin: "*", + // origin: inProd ? /\.lingdocs\.com$/ : "*", + credentials: true, +})); if (inProd) app.set('trust proxy', 1); setupSession(app); app.use(passport.initialize()); diff --git a/account/src/routers/api-router.ts b/account/src/routers/api-router.ts index 369eacc..5d96f3d 100644 --- a/account/src/routers/api-router.ts +++ b/account/src/routers/api-router.ts @@ -48,6 +48,7 @@ apiRouter.get("/user", (req, res, next) => { * adds (passed) test results to the record of the user signed in */ apiRouter.put("/user/tests", async (req, res, next) => { + console.log("came into the tests route", req.body.tests); if (!req.user) return next("user not found"); try { const { tests } = req.body as T.PostTestResultsBody;