mirror of https://github.com/Lissy93/dashy.git
Allow specifying a host on which to listen even with SSL
Allow specifying a host on which to listen even with SSL Grab the IP address from the HOST environment variable and use it to bind the SSL server. Default to 0.0.0.0 IPv6 compliant.
This commit is contained in:
parent
6f7c89deeb
commit
b4db66f339
|
@ -1,3 +1,5 @@
|
|||
const host = process.env.HOST || '0.0.0.0';
|
||||
|
||||
const fs = require('fs');
|
||||
const util = require('util');
|
||||
const https = require('https');
|
||||
|
@ -38,7 +40,7 @@ const startSSLServer = (app) => {
|
|||
key: fs.readFileSync(httpsCerts.private),
|
||||
cert: fs.readFileSync(httpsCerts.public),
|
||||
}, app);
|
||||
httpsServer.listen(SSLPort, () => { printSuccess(); });
|
||||
httpsServer.listen(SSLPort, host, () => { printSuccess(); });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue