2.0.0 • Published 1 year ago
@zaneray/express-cors v2.0.0
function:
process.env.CORS_WHITELIST will be read for origins to allow, other origins will be denied.
process.env.CORS_WHITELIST should be a CSV string like:
https://zaneray.com,https://www.zaneray.com
use:
//in your express server startup file
const express = require('express') const server = express() const cors = require("@zaneray/cors");
//we talk to origins defined in process.env.CORS_WHITELIST server.use(cors);