cors headers -

why?
This commit is contained in:
lingdocs 2022-09-01 19:17:32 +04:00
parent 42007a7ad2
commit 4f05b986f6
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ app.use(cors({
// origin: "*",
origin: inProd ? /\.lingdocs\.com$/ : "*",
credentials: true,
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
methods: ["GET","HEAD","PUT","POST","DELETE"],
}));
if (inProd) app.set('trust proxy', 1);
setupSession(app);