Skip to content

Commit 5575e08

Browse files
committed
refactor: remove compression, response compression is responsibility of load balancer
Signed-off-by: BoHong Li <[email protected]>
1 parent 0bed306 commit 5575e08

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

app.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var ejs = require('ejs')
77
var passport = require('passport')
88
var methodOverride = require('method-override')
99
var cookieParser = require('cookie-parser')
10-
var compression = require('compression')
1110
var session = require('express-session')
1211
var SequelizeStore = require('connect-session-sequelize')(session.Store)
1312
var fs = require('fs')
@@ -80,9 +79,6 @@ var sessionStore = new SequelizeStore({
8079
db: models.sequelize
8180
})
8281

83-
// compression
84-
app.use(compression())
85-
8682
// use hsts to tell https users stick to this
8783
if (config.hsts.enable) {
8884
app.use(helmet.hsts({

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"bootstrap-validator": "~0.11.8",
4444
"chance": "~1.0.4",
4545
"cheerio": "~0.22.0",
46-
"compression": "~1.7.4",
4746
"connect-flash": "~0.1.1",
4847
"connect-session-sequelize": "~6.0.0",
4948
"cookie": "~0.3.1",

yarn.lock

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,26 +2131,6 @@ compress-commons@^1.2.0:
21312131
normalize-path "^2.0.0"
21322132
readable-stream "^2.0.0"
21332133

2134-
compressible@~2.0.16:
2135-
version "2.0.16"
2136-
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.16.tgz#a49bf9858f3821b64ce1be0296afc7380466a77f"
2137-
integrity sha512-JQfEOdnI7dASwCuSPWIeVYwc/zMsu/+tRhoUvEfXz2gxOA2DNjmG5vhtFdBlhWPPGo+RdT9S3tgc/uH5qgDiiA==
2138-
dependencies:
2139-
mime-db ">= 1.38.0 < 2"
2140-
2141-
compression@~1.7.4:
2142-
version "1.7.4"
2143-
resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f"
2144-
integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==
2145-
dependencies:
2146-
accepts "~1.3.5"
2147-
bytes "3.0.0"
2148-
compressible "~2.0.16"
2149-
debug "2.6.9"
2150-
on-headers "~1.0.2"
2151-
safe-buffer "5.1.2"
2152-
vary "~1.1.2"
2153-
21542134
21552135
version "0.0.1"
21562136
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -5844,11 +5824,6 @@ [email protected]:
58445824
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8"
58455825
integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==
58465826

5847-
"mime-db@>= 1.38.0 < 2":
5848-
version "1.39.0"
5849-
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.39.0.tgz#f95a20275742f7d2ad0429acfe40f4233543780e"
5850-
integrity sha512-DTsrw/iWVvwHH+9Otxccdyy0Tgiil6TWK/xhfARJZF/QFhwOgZgOIvA2/VIGpM8U7Q8z5nDmdDWC6tuVMJNibw==
5851-
58525827
mime-db@~1.38.0:
58535828
version "1.38.0"
58545829
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad"

0 commit comments

Comments
 (0)