# LIST CORS DOMAINS

A package that help to define a list of damains to pass cors control.

## ENVIRONMENT REQUIREMENTS

In your .env file you are required to define variables below that will construct a corsOption

```.env
# Construct corsOption

CORS_WHITE_LIST = http://localhost:3000, https://accounts.google.com
ALLOWED_METHODS = GET,POST,PUT,DELETE
ALLOWED_HEADERS = Content-Type,Authorization
EXPOSED_HEADERS = ETag
ALLOW_CREDENTIALS = 1 # boolean (0, 1)
```

## USAGE ✨

Installation

```bash
npm install list-cors
```

In your application entry point (index.js or server.js)

```javascript
const corsOption = require('list-cors');

app.use(cors(corsOption));
```
