Skip to content

Commit

Permalink
Update examples/cors/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 8, 2012
1 parent cb75184 commit c70db96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/cors/index.js
@@ -1,4 +1,3 @@

/**
* Module dependencies.
*/
Expand All @@ -21,6 +20,7 @@ api.use(express.bodyParser());
*/

api.all('*', function(req, res, next){
if (!req.get('Origin')) return next();
// use "*" here to accept any origin
res.set('Access-Control-Allow-Origin', 'http://localhost:3000');
res.set('Access-Control-Allow-Methods', 'GET, POST');
Expand Down

0 comments on commit c70db96

Please sign in to comment.