From 18e52a06a279b9f57f7b1152d1cc0ee6fff13595 Mon Sep 17 00:00:00 2001 From: Geert Weening Date: Wed, 21 Jan 2015 17:45:06 -0800 Subject: [PATCH] [FIX] add cors allow methods --- lib/express_app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/express_app.js b/lib/express_app.js index c27a4121..8d50931e 100644 --- a/lib/express_app.js +++ b/lib/express_app.js @@ -23,6 +23,7 @@ app.use(bodyParser.json()); app.use(compress()); app.use(function(req, res, next) { res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); res.header('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type'); next(); });