Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 060653bd4cf83cbcfc2241b6a3bb8a82f0589330 2 parents b709009 + c70db96
@tj tj authored
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');
Please sign in to comment.
Something went wrong with that request. Please try again.