mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-05-22 01:53:47 -04:00
dont compress devicefile.ashx to show file sizes
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
918e889b1a
commit
e238aaecc1
@ -65,7 +65,12 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||||||
obj.db = db;
|
obj.db = db;
|
||||||
obj.app = obj.express();
|
obj.app = obj.express();
|
||||||
if (obj.args.agentport) { obj.agentapp = obj.express(); }
|
if (obj.args.agentport) { obj.agentapp = obj.express(); }
|
||||||
if (args.compression !== false) { obj.app.use(require('compression')()); }
|
if (args.compression !== false) {
|
||||||
|
obj.app.use(require('compression')({ filter: function (req, res) {
|
||||||
|
if (req.path == '/devicefile.ashx') return false; // Don't compress device file transfers to show file sizes
|
||||||
|
return require('compression').filter(req, res);
|
||||||
|
}}));
|
||||||
|
}
|
||||||
obj.app.disable('x-powered-by');
|
obj.app.disable('x-powered-by');
|
||||||
obj.tlsServer = null;
|
obj.tlsServer = null;
|
||||||
obj.tcpServer = null;
|
obj.tcpServer = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user