0.0.4 • Published 11 years ago

express-cors-options v0.0.4

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

Express CORS OPTIONS

Create a catch all for responding to CORS OPTIONS method requests


Installation

npm install express-cors-options

Usage:

// 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));
0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago