From a9750bdb9d7fe63d08585f69b4625408351696a6 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 14 Nov 2016 10:57:47 +0800 Subject: [PATCH] add content-type --- nodejs/routes/all.js | 1 + 1 file changed, 1 insertion(+) diff --git a/nodejs/routes/all.js b/nodejs/routes/all.js index 65ed025..3554d56 100644 --- a/nodejs/routes/all.js +++ b/nodejs/routes/all.js @@ -2,6 +2,7 @@ module.exports = function(req, res, next) { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Headers', 'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild'); res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE, OPTIONS'); + res.header('content-type', 'application/json; charset=utf-8'); if (req.method == 'OPTIONS') { res.send(200);