Binding web address

Adding the ability to change the binding address for the web server (0.0.0.0, open to everyone, or 127.0.0.1, for example, for proxying).
This commit is contained in:
Fastidious 2021-07-15 06:57:22 -04:00 committed by GitHub
parent 5248dfec77
commit ef7570777d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ const {
PORT,
RELEASE,
PASSWORD,
WEBHOST,
} = require('../config');
module.exports = class Server {
@ -130,8 +131,8 @@ module.exports = class Server {
return WireGuard.updateClientAddress({ clientId, address });
}))
.listen(PORT, () => {
debug(`Listening on http://0.0.0.0:${PORT}`);
.listen(PORT,WEBHOST, () => {
debug(`Listening on http://${WEBHOST}:${PORT}`);
});
}