1.0.3 • Published 3 years ago

whitelistcors v1.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

WHITELIST

PlugIn to configure CORS Cross-Origin Resource Sharing

Installation

    npm install --save whitelistcors

    yarn add whitelistcors

Use

To enable a resource to a specific request from an HTTP source, an array of addresses must be implemented.

    var whitelist = require('whitelistcors');

    var origins = ['http://localhost', 'http://mysite.com'];

    router.post('/', whitelist(origins), function(req, res, next) {

        .....
    
    });
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago