Permalink
Browse files

Merge branch 'master' of github.com:visionmedia/express

  • Loading branch information...
2 parents b709009 + c70db96 commit 060653bd4cf83cbcfc2241b6a3bb8a82f0589330 @tj tj committed Nov 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 examples/cors/index.js
View
2 examples/cors/index.js
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -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');

0 comments on commit 060653b

Please sign in to comment.