mirror of
https://github.com/wg-easy/wg-easy.git
synced 2025-10-05 15:47:18 +08:00
early fail if old password variable (#1350)
This commit is contained in:
@@ -29,6 +29,7 @@ const {
|
||||
PORT,
|
||||
WEBUI_HOST,
|
||||
RELEASE,
|
||||
PASSWORD,
|
||||
PASSWORD_HASH,
|
||||
MAX_AGE,
|
||||
LANG,
|
||||
@@ -428,6 +429,10 @@ module.exports = class Server {
|
||||
}),
|
||||
);
|
||||
|
||||
if (PASSWORD) {
|
||||
throw new Error('DO NOT USE PASSWORD ENVIRONMENT VARIABLE. USE PASSWORD_HASH INSTEAD.\nSee https://github.com/wg-easy/wg-easy/blob/master/How_to_generate_an_bcrypt_hash.md');
|
||||
}
|
||||
|
||||
createServer(toNodeListener(app)).listen(PORT, WEBUI_HOST);
|
||||
debug(`Listening on http://${WEBUI_HOST}:${PORT}`);
|
||||
|
||||
|
Reference in New Issue
Block a user