diff --git a/meshdevicefile.js b/meshdevicefile.js index 75dc1f6a..6950917e 100644 --- a/meshdevicefile.js +++ b/meshdevicefile.js @@ -204,9 +204,9 @@ module.exports.CreateMeshDeviceFile = function (parent, ws, res, req, domain, us if ((cmd == null) || (typeof cmd.op == 'string')) { if (cmd.op == 'ok') { if (typeof cmd.size == 'number') { - this.res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Type': 'application/octet-stream', 'Content-Disposition': 'attachment; filename="' + require('path').basename(this.file) + '"', 'Content-Length': cmd.size }); + this.res.set({ 'Cache-Control': 'no-store', 'Content-Type': 'application/octet-stream', 'Content-Disposition': 'attachment; filename="' + require('path').basename(this.file) + '"', 'Content-Length': cmd.size }); } else { - this.res.set({ 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Type': 'application/octet-stream', 'Content-Disposition': 'attachment; filename="' + require('path').basename(this.file) + '"' }); + this.res.set({ 'Cache-Control': 'no-store', 'Content-Type': 'application/octet-stream', 'Content-Disposition': 'attachment; filename="' + require('path').basename(this.file) + '"' }); } } else { try { this.res.sendStatus(401); } catch (ex) { } diff --git a/redirserver.js b/redirserver.js index b67100e1..75226e28 100644 --- a/redirserver.js +++ b/redirserver.js @@ -53,7 +53,7 @@ module.exports.CreateRedirServer = function (parent, db, args, func) { obj.app.get('/MeshServerRootCert.cer', function (req, res) { // The redirection server starts before certificates are loaded, make sure to handle the case where no certificate is loaded now. if (obj.certificates != null) { - res.set({ 'Cache-Control': "no-cache, no-store, must-revalidate", "Pragma": "no-cache", "Expires": "0", "Content-Type": "application/octet-stream", "Content-Disposition": "attachment; filename=\"" + obj.certificates.RootName + ".cer\"" }); + res.set({ 'Cache-Control': 'no-store', 'Content-Type': 'application/octet-stream', 'Content-Disposition': 'attachment; filename="' + obj.certificates.RootName + '.cer"' }); var rootcert = obj.certificates.root.cert; var i = rootcert.indexOf('-----BEGIN CERTIFICATE-----\r\n'); if (i >= 0) { rootcert = rootcert.substring(i + 29); } diff --git a/views/default.handlebars b/views/default.handlebars index f913055b..2aed4867 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -1212,6 +1212,7 @@
+