Skip to content

Commit

Permalink
support for Connect usage sans Express expressjs#11; bump to v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
troygoode committed Oct 14, 2013
1 parent f934e78 commit 9a1b6e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
function configureOrigin(options, req) {
var origin = options.origin;
if (origin === true) {
origin = req.headers.origin;
origin = req.headers['origin'];
} else if (!origin) {
origin = '*';
}
Expand Down Expand Up @@ -142,7 +142,7 @@

if (originCallback) {
req.pause(); // make sure downstream middleware don't miss any data events
originCallback(req.headers.origin, function (err, origin) {
originCallback(req.headers['origin'], function (err, origin) {
req.resume();
if (err || !origin) {
next(err);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cors"
, "version": "2.0.0"
, "version": "2.1.0"
, "author": "Troy Goode <troygoode@gmail.com> (https://github.com/troygoode/)"
, "description": "middleware for dynamically or statically enabling CORS in express/connect applications"
, "keywords": ["cors", "express", "connect", "middleware"]
Expand Down

0 comments on commit 9a1b6e4

Please sign in to comment.