From 78d3f5631970dbdb29a3f038dc059872a9fb5019 Mon Sep 17 00:00:00 2001 From: adueck Date: Mon, 30 Jan 2023 00:50:01 +0500 Subject: [PATCH] cors test --- account/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/account/src/index.ts b/account/src/index.ts index 51110a0..8f82d4f 100644 --- a/account/src/index.ts +++ b/account/src/index.ts @@ -14,10 +14,6 @@ const sameOriginCorsOpts = { origin: inProd ? /\.lingdocs\.com$/ : "*", credentials: true, }; -// const openCorsOpts = { -// origin: "*", -// credentials: false, -// }; const app = express(); // MIDDLEWARE AND SETUP 🔧 // @@ -33,6 +29,10 @@ app.use(passport.initialize()); app.use(passport.session()); setupPassport(passport); +app.get("/test", cors(), (req, res) => { + res.send({ ok: true }); +}); + // Web Interface - returning html (mostly) app.use("/", cors(sameOriginCorsOpts), authRouter(passport)); // REST API - returning json