backend/app/CORSUnit.js
garrettmills 157283a1cc
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
Move CORS to apply to all routes
2020-12-24 14:46:11 -06:00

15 lines
250 B
JavaScript

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