Skip to content

Commit b30d01e

Browse files
committedAug 29, 2018
Move cache before gzip
1 parent e498159 commit b30d01e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/express-http-server.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class ExpressHTTPServer {
3030

3131
this.beforeMiddleware(app);
3232

33+
if (this.cache) {
34+
app.get('/*', this.buildCacheMiddleware());
35+
}
36+
3337
if (this.gzip) {
3438
this.app.use(require('compression')());
3539
}
@@ -39,10 +43,6 @@ class ExpressHTTPServer {
3943
app.use(basicAuth(username, password));
4044
}
4145

42-
if (this.cache) {
43-
app.get('/*', this.buildCacheMiddleware());
44-
}
45-
4646
if (this.distPath) {
4747
app.get('/', fastbootMiddleware);
4848
app.use(express.static(this.distPath));

0 commit comments

Comments
 (0)