[api] allow CORS

This commit is contained in:
Andrea Vos 2021-07-17 16:37:04 +02:00
parent 99324a71f1
commit d5fb9cc0de

View File

@ -60,6 +60,8 @@ app.use(async function (req, res, next) {
res.on('finish', async () => {
await req.db.close();
});
res.set('Access-Control-Allow-Origin', '*');
res.set('Access-Control-Allow-Headers', 'authorization,content-type');
next();
} catch (err) {
next(err);