diff --git a/be/src/expressHelper.ts b/be/src/expressHelper.ts index 7f2231f..6d250e7 100644 --- a/be/src/expressHelper.ts +++ b/be/src/expressHelper.ts @@ -3,9 +3,16 @@ import bodyParser from "body-parser"; const app: Express = express(); +app.use(function(req, res, next) { + res.header("Access-Control-Allow-Origin", "*"); + res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + next(); +}); + app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); export { app }; +