Package Exports
- express-cors-options
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (express-cors-options) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Express CORS OPTIONS
Create a catch all for responding to CORS OPTIONS method requests
Installation
npm install express-cors-optionsUsage:
// Place after router
app.use(app.router);
//
var options = {
origin: 'http://foo.com', // default: '*'
method: 'GET,PUT,POST', // default: 'GET,PUT,POST,DELETE,HEAD,OPTIONS'
headers: 'Content-Type, Content-Length' // default: 'Content-Type, Authorization, Content-Length, X-Requested-With, X-HTTP-Method-Override'
};
app.use(require('express-cors-options')(options));