mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed content-disposition headers.
This commit is contained in:
parent
df02307fec
commit
3a2355b98b
3 changed files with 17 additions and 17 deletions
|
@ -58,7 +58,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-cache, no-store, must-revalidate", "Pragma": "no-cache", "Expires": "0", "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); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue