Skip to content

Commit

Permalink
Merge pull request expressjs#69 from stevenp/master
Browse files Browse the repository at this point in the history
Update README to fix incorrect example
  • Loading branch information
troygoode authored Aug 23, 2016
2 parents 999af0f + 9c0c6a3 commit cebfccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ var whitelist = ['http://example1.com', 'http://example2.com'];
var corsOptions = {
origin: function(origin, callback){
var originIsWhitelisted = whitelist.indexOf(origin) !== -1;
callback(null, originIsWhitelisted);
callback(originIsWhitelisted ? null : 'Bad Request', originIsWhitelisted);
}
};

Expand Down

0 comments on commit cebfccb

Please sign in to comment.