mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 22:31:15 +00:00
Compress static files
This commit is contained in:
4
app.js
4
app.js
@@ -18,6 +18,9 @@ function initApp (config, callback) {
|
||||
app.server = http.createServer(app.express);
|
||||
app.webservice = createClient(config.webservice);
|
||||
|
||||
// Compression
|
||||
app.express.use(express.compress());
|
||||
|
||||
// Public files
|
||||
app.express.use(express.static(__dirname + '/public', {
|
||||
maxAge: (process.env.NODE_ENV === 'production' ? 604800 : 0)
|
||||
@@ -25,7 +28,6 @@ function initApp (config, callback) {
|
||||
|
||||
// General express config
|
||||
app.express.disable('x-powered-by');
|
||||
app.express.use(express.compress());
|
||||
app.express.use(express.bodyParser());
|
||||
|
||||
// View engine
|
||||
|
Reference in New Issue
Block a user