[api] allow CORS

This commit is contained in:
Avris 2021-07-17 16:37:04 +02:00
parent 32d65b52ec
commit cf56b87f0f
1 changed files with 2 additions and 0 deletions

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);