diff --git a/bin/proxy/http.route.js b/bin/proxy/http.route.js index bc03a41b..34066376 100644 --- a/bin/proxy/http.route.js +++ b/bin/proxy/http.route.js @@ -680,6 +680,7 @@ function doRoute(req, res) { contentType.indexOf('application/x-www-form-urlencoded') > -1 || contentType.indexOf('text/plain') > -1 || contentType.indexOf('application/json') > -1 + || contentType.indexOf('text/json') > -1 ) { parseBody(req, res, function() { return modulePathHandler(); diff --git a/bin/tsw/util/http/parseBody.js b/bin/tsw/util/http/parseBody.js index 4570cfab..c971e487 100644 --- a/bin/tsw/util/http/parseBody.js +++ b/bin/tsw/util/http/parseBody.js @@ -65,7 +65,7 @@ module.exports = function(req, res, next) { } req.body = req.POST; - } else if (contentType.indexOf('application/json') > -1) { + } else if (contentType.indexOf('application/json') > -1 || contentType.indexOf('text/json') > -1 ) { try { req.POST = JSON.parse(req.REQUEST.body);