Skip to content

Commit

Permalink
fix: swap compress middleware and notFound position (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
alsotang authored and fengmk2 committed Nov 28, 2018
1 parent 769af76 commit 8bd0a2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion servers/registry.js
Expand Up @@ -35,11 +35,12 @@ app.use(cors({
}));
app.use(auth());
app.use(proxyToNpm());
app.use(notFound);

if (config.enableCompress) {
app.use(middlewares.compress({ threshold: 150 }));
}
app.use(notFound);

app.use(conditional());
app.use(etag());

Expand Down

0 comments on commit 8bd0a2d

Please sign in to comment.