1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

fix(gzip): Add gzip support

This commit is contained in:
ivaosthu 2018-08-22 17:39:09 +02:00 committed by Ivar Conradi Østhus
parent d12dbc9f01
commit ca3e9d1031
3 changed files with 26 additions and 1 deletions

View File

@ -1,6 +1,7 @@
'use strict';
const express = require('express');
const compression = require('compression');
const favicon = require('serve-favicon');
const cookieParser = require('cookie-parser');
const routes = require('./routes');
@ -26,6 +27,7 @@ module.exports = function(config) {
config.preHook(app);
}
app.use(compression());
app.use(cookieParser());
app.use(express.json({ strict: false }));
app.use(unleashSession(config));

View File

@ -59,6 +59,7 @@
"dependencies": {
"async": "^2.1.5",
"commander": "^2.15.1",
"compression": "^1.7.3",
"cookie-parser": "^1.4.3",
"cookie-session": "^2.0.0-beta.3",
"db-migrate": "^0.11.1",

View File

@ -1335,6 +1335,24 @@ component-emitter@^1.2.0, component-emitter@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
compressible@~2.0.14:
version "2.0.14"
resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.14.tgz#326c5f507fbb055f54116782b969a81b67a29da7"
dependencies:
mime-db ">= 1.34.0 < 2"
compression@^1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db"
dependencies:
accepts "~1.3.5"
bytes "3.0.0"
compressible "~2.0.14"
debug "2.6.9"
on-headers "~1.0.1"
safe-buffer "5.1.2"
vary "~1.1.2"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@ -4111,6 +4129,10 @@ micromatch@^3.1.8:
snapdragon "^0.8.1"
to-regex "^3.0.1"
"mime-db@>= 1.34.0 < 2":
version "1.36.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397"
mime-db@~1.30.0:
version "1.30.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
@ -5480,7 +5502,7 @@ safe-buffer@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"