mmm
This commit is contained in:
parent
4f05b986f6
commit
ef5f0c9444
|
@ -20,6 +20,12 @@ app.use(cors({
|
||||||
credentials: true,
|
credentials: true,
|
||||||
methods: ["GET","HEAD","PUT","POST","DELETE"],
|
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);
|
if (inProd) app.set('trust proxy', 1);
|
||||||
setupSession(app);
|
setupSession(app);
|
||||||
app.use(passport.initialize());
|
app.use(passport.initialize());
|
||||||
|
|
Loading…
Reference in New Issue