@acastellon/cors

CORS filter for Node Express Application

Usage no npm install needed!

<script type="module">
  import acastellonCors from 'https://cdn.skypack.dev/@acastellon/cors';
</script>

README

CORS

Wrapper object that contains the generic most common configuration values of filtering & Options to be used in Node Express Applications.

it uses a plain text file to define by line what are the allowed requesters by CORS.

usage:

const cors      = require('@acastellon/cors')('<path/to/whiletlist>');

cors.enableCORS(app);  
// where 'app' is the Application Express instance object.