Skip to content
This repository
Browse code

add OPTIONS to cors example. Closes #1398

  • Loading branch information...
commit 4283f38698688a2d879d14d8ce3d38c7f3ab0ca8 1 parent 2d49c0d
TJ Holowaychuk authored November 04, 2012

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  examples/cors/index.js
1  examples/cors/index.js
@@ -26,6 +26,7 @@ api.all('*', function(req, res, next){
26 26
   res.set('Access-Control-Allow-Methods', 'GET, POST');
27 27
   res.set('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type');
28 28
   // res.set('Access-Control-Allow-Max-Age', 3600);
  29
+  if ('OPTIONS' == req.method) return res.send(200);
29 30
   next();
30 31
 });
31 32
 

0 notes on commit 4283f38

Please sign in to comment.
Something went wrong with that request. Please try again.