diff --git a/plugins-server/cloud9.connect/connect-plugin.js b/plugins-server/cloud9.connect/connect-plugin.js index c350a914519..c1fb4b7e81e 100644 --- a/plugins-server/cloud9.connect/connect-plugin.js +++ b/plugins-server/cloud9.connect/connect-plugin.js @@ -42,7 +42,7 @@ module.exports = function startup(options, imports, register) { if (buildVersion !== false) { res.setHeader("x-build-version", buildVersion); } - if(req.method === "POST" && req.headers["content-type"].indexOf("text/plain") === 0) { + if(req.method === "POST" && typeof req.headers["content-type"] === "string" && req.headers["content-type"].indexOf("text/plain") === 0) { req.headers["content-type"] = "application/x-www-form-urlencoded"; } next();