Add configuration option to use express-minify for CSS and JS
This commit is contained in:
parent
e6acf92bdb
commit
6fe31b9a3e
5 changed files with 50 additions and 2 deletions
|
|
@ -184,6 +184,11 @@ module.exports = {
|
|||
app.use(express.json());
|
||||
app.use(express.urlencoded());
|
||||
app.use(express.cookieParser());
|
||||
|
||||
if (Config.get("http.minify")) {
|
||||
app.use(require("express-minify")());
|
||||
Logger.syslog.log("Enabled express-minify for CSS and JS");
|
||||
}
|
||||
/* Order here is important
|
||||
* Since I placed /r/:channel above *, the function will
|
||||
* not apply to the /r/:channel route. This prevents
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue