0.0.1 • Published 5 years ago

@zaneray/cors v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

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);

0.0.1

5 years ago