We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb75184 commit c70db96Copy full SHA for c70db96
examples/cors/index.js
@@ -1,4 +1,3 @@
1
-
2
/**
3
* Module dependencies.
4
*/
@@ -21,6 +20,7 @@ api.use(express.bodyParser());
21
20
22
23
api.all('*', function(req, res, next){
+ if (!req.get('Origin')) return next();
24
// use "*" here to accept any origin
25
res.set('Access-Control-Allow-Origin', 'http://localhost:3000');
26
res.set('Access-Control-Allow-Methods', 'GET, POST');
0 commit comments