1.0.2 • Published 6 years ago
@zaneray/express-cors v1.0.2
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);