Skip to content

Commit 89707d7

Browse files
author
vikasrohit
authored
Merge pull request #200 from topcoder-platform/hotfix/gzip_compression
Hotfix/gzip compression
2 parents f40f5f3 + 2945905 commit 89707d7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"bluebird": "^3.4.1",
4040
"body-parser": "^1.15.0",
4141
"co": "^4.6.0",
42+
"compression": "^1.7.3",
4243
"config": "^1.20.1",
4344
"continuation-local-storage": "^3.1.7",
4445
"cors": "^2.8.4",

src/routes/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import _ from 'lodash';
33
import config from 'config';
44
import validate from 'express-validation';
55
import { Router } from 'express';
6+
import compression from 'compression';
67

78
const router = Router();
89

@@ -46,6 +47,8 @@ router.route('/v4/projects/metadata/productCategories')
4647
router.route('/v4/projects/metadata/productCategories/:key')
4748
.get(require('./productCategories/get'));
4849

50+
51+
router.use('/v4/projects/metadata', compression());
4952
router.route('/v4/projects/metadata')
5053
.get(require('./metadata/list'));
5154

0 commit comments

Comments
 (0)