This commit is contained in:
lingdocs 2022-09-01 19:23:59 +04:00
parent 4f05b986f6
commit ef5f0c9444
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,12 @@ app.use(cors({
credentials: true,
methods: ["GET","HEAD","PUT","POST","DELETE"],
}));
app.use((req, res, next) => {
// res.append('Access-Control-Allow-Origin', ['*']);
res.append('Access-Control-Allow-Methods', 'GET,HEAD,PUT,POST,DELETE');
res.append("test-header", "cool");
next();
});
if (inProd) app.set('trust proxy', 1);
setupSession(app);
app.use(passport.initialize());