File tree Expand file tree Collapse file tree
packages/fastboot-app-server/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"use strict" ;
22
33const express = require ( 'express' ) ;
4+ const compression = require ( 'compression' ) ;
45const basicAuth = require ( './basic-auth' ) ;
56
67function noop ( ) { }
@@ -14,7 +15,7 @@ class ExpressHTTPServer {
1415 this . username = options . username ;
1516 this . password = options . password ;
1617 this . cache = options . cache ;
17- this . gzip = options . gzip || false ;
18+ this . gzip = options . gzip || true ;
1819 this . host = options . host ;
1920 this . port = options . port ;
2021 this . beforeMiddleware = options . beforeMiddleware || noop ;
@@ -31,7 +32,7 @@ class ExpressHTTPServer {
3132 this . beforeMiddleware ( app ) ;
3233
3334 if ( this . gzip ) {
34- this . app . use ( require ( ' compression' ) ( ) ) ;
35+ this . app . use ( compression ( ) ) ;
3536 }
3637
3738 if ( username !== undefined || password !== undefined ) {
You can’t perform that action at this time.
0 commit comments