This commit is contained in:
手瓜一十雪
2024-11-14 13:07:10 +08:00
parent 1a1919bb15
commit c5d104b08b
8 changed files with 7 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ interface WebUiCredentialJson {
}
export class AuthHelper {
private static secretKey = Math.random().toString(36).slice(2);
private static readonly secretKey = Math.random().toString(36).slice(2);
/**
* 签名凭证方法。

View File

@@ -114,7 +114,7 @@ export class WebUiConfigWrapper {
// 不希望回写的配置放后面
// 查询主机地址是否可用
const [host_err, host] = await tryUseHost(parsedConfig.host).then(data => [null, data as string]).catch(err => [err, null]);
const [host_err, host] = await tryUseHost(parsedConfig.host).then(data => [null, data]).catch(err => [err, null]);
if (host_err) {
console.log('host不可用', host_err);
parsedConfig.port = 0; // 设置为0禁用WebUI