cors.js
314 Bytes
const path = require('path')
require('dotenv').config({path: path.join(__dirname, "../.env")})
module.exports = {
origin: [
'http://localhost:8560',
...(process.env.CORS_ALLOWED_URL ? process.env.CORS_ALLOWED_URL.split(',') : []),
],
credentials: true,
optionsSuccessStatus: 200
}