mirror of
https://github.com/scratchfoundation/restify-cors-middleware.git
synced 2024-12-18 20:02:22 -05:00
19 lines
370 B
JavaScript
19 lines
370 B
JavaScript
var restify = require('restify');
|
|
|
|
//
|
|
// For now, delegate to restify.CORS
|
|
//
|
|
// Although there's a few things we could fix
|
|
// around Access-Control-Expose-Headers
|
|
//
|
|
// It would also break the cyclic dependency with Restify :)
|
|
//
|
|
|
|
exports.handler = function(options) {
|
|
|
|
return restify.CORS({
|
|
origins: options.origins,
|
|
headers: options.exposeHeaders
|
|
});
|
|
|
|
};
|