From 6b867a06907667c3b3b437dbc358db748d210d21 Mon Sep 17 00:00:00 2001 From: VibhorCodecianGupta Date: Mon, 11 Dec 2017 23:08:14 +0530 Subject: [PATCH] compressed JSON in production env --- packages/rocketchat-api/server/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-api/server/api.js b/packages/rocketchat-api/server/api.js index 4fa3055f2d15..5113d3265f46 100644 --- a/packages/rocketchat-api/server/api.js +++ b/packages/rocketchat-api/server/api.js @@ -359,7 +359,7 @@ const createApi = function(enableCors) { RocketChat.API.v1 = new API({ version: 'v1', useDefaultAuth: true, - prettyJson: true, + prettyJson: process.env.NODE_ENV == 'development', enableCors, auth: getUserAuth() }); @@ -368,7 +368,7 @@ const createApi = function(enableCors) { if (!RocketChat.API.default || RocketChat.API.default._config.enableCors !== enableCors) { RocketChat.API.default = new API({ useDefaultAuth: true, - prettyJson: true, + prettyJson: process.env.NODE_ENV == 'development', enableCors, auth: getUserAuth() });