From c328e6947659784b83050e60d4e33e5565e0ceeb Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 3 Sep 2022 17:46:17 +0400 Subject: [PATCH] cors work --- account/src/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/account/src/index.ts b/account/src/index.ts index 4ca5eeb..d80275a 100644 --- a/account/src/index.ts +++ b/account/src/index.ts @@ -15,15 +15,9 @@ app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(express.static("public")); app.use(cors({ - // origin: "*", origin: inProd ? /\.lingdocs\.com$/ : "*", credentials: true, })); -app.use((req, res, next) => { - // res.append('Access-Control-Allow-Origin', ['*']); - res.append('Access-Control-Allow-Methods', 'GET,HEAD,PUT,POST,DELETE,OPTIONS'); - next(); -}); if (inProd) app.set('trust proxy', 1); setupSession(app); app.use(passport.initialize());