Skip to content

Commit

Permalink
whitespace tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
troygoode committed Apr 29, 2013
1 parent c436305 commit 4e01244
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ module.exports = function(param){
}else{
origin = config.origin;
}

// why waste time if CORS is switched off
if (origin === false) { next(); return; }
if(origin === false){
return next();
}

// turn METHODS into a string
if(config.methods.join){
Expand Down Expand Up @@ -75,7 +77,7 @@ module.exports = function(param){
if(origin !== false){
res.header('Access-Control-Allow-Origin', origin); // required
}

// append the allow credentials flag, if it is present
if(credentials === true){
res.header('Access-Control-Allow-Credentials', 'true');
Expand Down

0 comments on commit 4e01244

Please sign in to comment.