Closed johngeorgewright closed 9 years ago
At the moment there's no handling for asynchronous operations within the origin finding.
origin
cors({ origin: function (request) { // ... search through database or something just as fun } });
This pull request adds the opportunity to return anything that we can yield (promises etc).
cors({ origin: function (request) { return new Promise(function (resolve) { // some asynchronous operation resolve(something); }); } });
I'm not sure if need to bundle Promises in this module wouldn't be just the case to use another generator with the origin?
At the moment there's no handling for asynchronous operations within the
origin
finding.This pull request adds the opportunity to return anything that we can yield (promises etc).