Ability to change ip address WebUI binds to with WEBUI_HOST env var

This commit is contained in:
Rahil Bhimjiani 2023-06-03 15:40:43 +05:30
parent 28b12dde6c
commit dd86dbaef0
No known key found for this signature in database
GPG key ID: 6D39AB4713797E6F
3 changed files with 5 additions and 2 deletions

View file

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