Closed SuheylZ closed 1 year ago
Hi @SuheylZ, you can use available plugins, just as in express. See: https://www.npmjs.com/package/cors
npm install cors
const restana = require('restana')
const cors = require('cors')
const app = restana()
app.use(cors())
app.get('/products/:id', (req, res) => {
res.send({msg: 'This is CORS-enabled for all origins!'})
})
app.start()
I could not find any mention of CORS in restana. is there a way I could configure CORS?