Skip to content

Commit 500c29a

Browse files
authored
Ensure gzip option is used. (#18)
`gzip` option was introduced in a recent PR and was properly threaded through from `fastboot-app-server.js` to `worker.js`, but when the worker started its `express-http-server.js` it wasn't passed the `gzip` option. Ultimately, this meant that `gzip: true` had no effect.
1 parent 97f2633 commit 500c29a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/fastboot-app-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FastBootAppServer {
3131
distPath: this.distPath || process.env.FASTBOOT_DIST_PATH,
3232
cache: this.cache,
3333
gzip: this.gzip,
34-
httpServer: this.httpServer,
34+
httpServer: this.httpServer
3535
});
3636

3737
this.worker.start();

src/worker.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ class Worker {
1111
this.ui = options.ui;
1212
this.cache = options.cache;
1313
this.gzip = options.gzip || false;
14-
14+
1515
if (!this.httpServer) {
1616
this.httpServer = new ExpressHTTPServer({
1717
ui: this.ui,
1818
distPath: this.distPath,
19-
cache: this.cache
19+
cache: this.cache,
20+
gzip: this.gzip
2021
});
2122
}
2223

2324
if (!this.httpServer.cache) { this.httpServer.cache = this.cache; }
2425
if (!this.httpServer.distPath) { this.httpServer.distPath = this.distPath; }
25-
if (!this.httpServer.ui) { this.httpServer.ui = this.ui; }
26+
if (!this.httpServer.ui) { this.httpServer.ui = this.ui; }
2627
}
2728

2829
start() {

0 commit comments

Comments
 (0)