0.0.5 • Published 4 years ago
@zaneray/express-cors v0.0.5
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);