diff --git a/app.js b/app.js index cb16e8e..de1efc4 100644 --- a/app.js +++ b/app.js @@ -17,7 +17,7 @@ const corsWhitelist = [ "http://minis.walamana.de", "localhost:80", "http://localhost:80", "http://localhost:4200", - undefined] + undefined] // FIXME: REMOVE THIS AFTER DEBUGGING! var bodyParser = require('body-parser') @@ -56,6 +56,13 @@ con.connect(err => { console.log("Connected to database!"); }); +// Global headers + +app.get('/*',function(req,res,next){ + res.header('Access-Control-Allow-Credentials' , true ); + next(); +}); + app.get('/', (req, res) => { console.log(con);