diff --git a/server/server.js b/server/server.js index 0a85883..b009061 100644 --- a/server/server.js +++ b/server/server.js @@ -28,6 +28,11 @@ const corsOptions = { app.options('*', cors(corsOptions)); app.use('*', cors(corsOptions)); +app.use((req, res, next) => { + res.header("Access-Control-Allow-Origin", allowedOrigin); + res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + next(); +}); // disable logging for tests if (process.env.NODE_ENV !== 'test') app.use(logger('dev'));