mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
add OPTIONS to cors example. Closes #1398
This commit is contained in:
parent
2d49c0d1f3
commit
4283f38698
|
|
@ -26,6 +26,7 @@ api.all('*', function(req, res, next){
|
|||
res.set('Access-Control-Allow-Methods', 'GET, POST');
|
||||
res.set('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type');
|
||||
// res.set('Access-Control-Allow-Max-Age', 3600);
|
||||
if ('OPTIONS' == req.method) return res.send(200);
|
||||
next();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user