| 942 | } | 942 | } |
| 943 | | 943 | |
| 944 | /** | 944 | /** |
| 945 | * Prints a warning message | | |
| 946 | * @param {string} message The warning message to print | | |
| 947 | * @returns {void} | | |
| 948 | */ | | |
| 949 | function logSecurityWarning(message) { | | |
| 950 | if (basicAuthMode || enableWhitelist) return; // safe! | | |
| 951 | console.error(color.yellow(message)); | | |
| 952 | if (getConfigValue('securityOverride', false)) { | | |
| 953 | console.warn(color.red('Security has been overridden. If it\'s not a trusted network, change the settings.')); | | |
| 954 | } | | |
| 955 | } | | |
| 956 | | | |
| 957 | /** | | |
| 958 | * Handles the case where the server failed to start on one or both protocols. | 945 | * Handles the case where the server failed to start on one or both protocols. |
| 959 | * @param {boolean} v6Failed If the server failed to start on IPv6 | 946 | * @param {boolean} v6Failed If the server failed to start on IPv6 |
| 960 | * @param {boolean} v4Failed If the server failed to start on IPv4 | 947 | * @param {boolean} v4Failed If the server failed to start on IPv4 |