This repository has been archived on 2025-05-05. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
restify-cors-middleware/src/actual.js

21 lines
408 B
JavaScript
Raw Normal View History

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({
credentials: options.credentials,
origins: options.origins,
headers: options.exposeHeaders
});
};