15 lines
250 B
JavaScript
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
|