Move CORS to apply to all routes
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
2020-12-24 14:46:11 -06:00
parent f935507612
commit 157283a1cc
3 changed files with 16 additions and 1 deletions

14
app/CORSUnit.js Normal file
View File

@@ -0,0 +1,14 @@
const Unit = require('libflitter/Unit')
const cors = require('cors')
class CORSUnit extends Unit {
static get name() {
return 'cors'
}
async go(app) {
app.express.use(cors())
}
}
module.exports = exports = CORSUnit

View File

@@ -19,7 +19,7 @@ class IonicUnit extends Unit {
}
async go(app) {
app.express.use(cors())
// app.express.use(cors())
app.express.use('/i', [
this.canon.get('middleware::auth:UserOnly'),